I am recording a non compressed wave-File with iMedia AudioRecorder and want to analyze it in real time: every 50 milliseconds the latest 2205 Shorts (sample rate 44.100 / 20) from the recorded file with Random Access File. I tried several variants, but got speed problems with it (too slow):
1. raf_Wave.ReadShort(iPos) 'read every single short directly from the Random Access File
2. raf_Wave.ReadBytes(b_Data, 0, i_AnalyseBytes, i_BytesOffset) : i_Data = bc.ShortsFromBytes(b_Data) 'copy Bytes in an ByteArray and than concert it to a shortArray
Is there another variant to get the recorded short-array (latest 2205 shorts from the file) faster? Thank you for your ideas!
1. raf_Wave.ReadShort(iPos) 'read every single short directly from the Random Access File
2. raf_Wave.ReadBytes(b_Data, 0, i_AnalyseBytes, i_BytesOffset) : i_Data = bc.ShortsFromBytes(b_Data) 'copy Bytes in an ByteArray and than concert it to a shortArray
Is there another variant to get the recorded short-array (latest 2205 shorts from the file) faster? Thank you for your ideas!