Displaying 2 results from an estimated 2 matches for "wmreadsample".
2012 Mar 15
0
converting unsigned short sample to signed short sample
...are provided by an audio
> driver for an audio subsystem (microphone ADC...) in a wireless sensor
> node(intelmote2 ), following is the function that captures the samples and
> returns them:
>
> ????? ? ? ? /* reads one audio sample from the I2S RXFIFO buffer */
> ? ?? ?? uint16_t WmReadSample()
> ?????? {
> ?????? ?? while( (SASR0&2)==0 );
> ?????????? return (SADR)&0xFFFF;
> ?????? }
>
> you can notice its return type uint16_t which i must adapt to signed 2-bytes
> !
Thanks, I was not doubting that the samples returned by the "driver"
are unsigne...
2012 Mar 14
4
converting unsigned short sample to signed short sample
Thanks a lot for replying,
The question now is , after subtracting 32767 from each unsigned sample, will the new signed samples represent the same original voice ?
???? For explanation, assume "Hi" is said in 8000 unsigned sample ,if i subtract 32767 from each sample and play the resulting 8000 sample as signed PCM samples,will they be "Hi" ?!
Forgive me about my questions ,