How can I recording to WAV file in unsigned 8-bits PCM mono format? #2118
-
How can I recording to WAV file in unsigned 8-bits PCM mono format?
|
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 5 replies
-
You will need to convert the provided data format to 8 bit! If I remember right WAV expects uint8_t instead of int8_t! |
Beta Was this translation helpful? Give feedback.
-
Hi again @pschatzmann, I try to code but I'm doing something wrong because the audio is not fine. NOTE: This is only a piece of my code. Line in recording to WAV works fine without NumberFormatConverterStream
Attached files with and without conversion. |
Beta Was this translation helpful? Give feedback.
-
Ok..I understand. Inline of this issue. How can I record with encoded PCM to WAV file? I try with objects chain without success. |
Beta Was this translation helpful? Give feedback.
-
By implementing one of the following chains:
If you use the second option, you need to provide the correct format to the EncodedAudioStream (as mentioned above) or have the StreamCopy synchronize the fomrat using copier.setSynchAudioInfo(true) |
Beta Was this translation helpful? Give feedback.
-
Hi @pschatzmann. I don´t achieve a good WAV quality. continue with strange recording, besides, the sound appears like an accelerated. This following I have done. Do your see any wrong in the code?
|
Beta Was this translation helpful? Give feedback.
-
Sorry. Now works fine but How can I do to record on mono mode? |
Beta Was this translation helpful? Give feedback.
-
Now, I try to replicate this above to player playing but the first time WAV sampling rate propagate well, but the second playing the sampling rate keeps at 44.1KHz. How can I do to propagate sampling rate to kitStream always using PLAYER object instead of COPIER? |
Beta Was this translation helpful? Give feedback.
You will need to convert the provided data format to 8 bit!
If I remember right WAV expects uint8_t instead of int8_t!