audio - Play Raw File Using NAudio Library -


Hi, I have the code to run the raw file. The duration of my raw file is 25 seconds This code is working fine, but after some time my program raw file plays very slow speed of around 50% and my raw file does not extend backwards to 36 when i Restart the PC and run my program to work its normaly again. I work correctly to start my PC every single hour again please check what my code is somewhat wrong with my code

  try slow raw stream = File. OpenRead ( "C: \ myFile.raw") Slow waveFormat = New NAudio.Wave.WaveFormat (8000, 16, 1) Dim rawSource = New RawSourceWaveStream (rawStream, waveFormat) Dim audioBufferSize = 320 Offset as dim integer = 0 slow buffer byte As () = new byte (audioBufferSize - 1) {} dim buffer 2 as byte () = new byte (320) {} while (raw source reads (buffer 2, offset, audio) Fill Size)> Write MSF (Buffer 2, Offset, Audiobufor Size) Thread. Sleep (20) And while Capture X Export Try MSObbox (XToString)    

No Nudges Any effect in your code sample is reading data from all the files that you are doing, and it's on the serial port Is sending. RawSourceWaveStream simply connects to a WaveFormat in the file stream, but there is nothing The stream is reading the audio port that you are sending to the serial port, the device you are listening to has an audio format which is expecting. You should know what it is. Then you can use NAudio to convert the audio to the correct format if it is not already in the correct sample rate / channel calculation (which can be the most likely cause of two audio games at 50% speed) < / P>

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -