Displaying 20 results from an estimated 23 matches for "nsamplespersec".
2001 Mar 14
2
Playing Problems :(
...fest with ov_read. Then I start to play firts buffer.
When i stops I'll start to play second buffer and fill firts buffer with
ov_read. Buffer setting are:
p_oggB->wfx.wFormatTag = WAVE_FORMAT_PCM;
p_oggB->wfx.nChannels = oggstruct.vi->channels;
p_oggB->wfx.nSamplesPerSec = (unsigned long) oggstruct.vi->rate;
p_oggB->wfx.wBitsPerSample = 16;
p_oggB->wfx.nBlockAlign = (oggstruct.vi->channels *
p_oggB->wfx.wBitsPerSample) / 8;
p_oggB->wfx.nAvgBytesPerSec = (unsigned long)
(p_oggB->wfx.nSamplesPerSec * p_oggB->wfx.nBlockA...
2001 Aug 26
4
On the "broken" .WAV files issue
...WAVEFORMAT structure describes the format of waveform-audio data. Only
format information common to all waveform-audio data formats is included in this
structure. This structure has been superseded by the WAVEFORMATEX structure.
typedef struct {
WORD wFormatTag;
WORD nChannels;
DWORD nSamplesPerSec;
DWORD nAvgBytesPerSec;
WORD nBlockAlign;
} WAVEFORMAT;
Members
wFormatTag
Format type. The following type is defined:
WAVE_FORMAT_PCM
Waveform-audio data is PCM.
nChannels
Number of channels in the waveform-audio data. Mono data uses one channel and
stereo data uses two c...
2007 Mar 19
1
Problem with WAVE_FORMAT_ADPCM sound files
Hi all,
I recently managed to install "multimedia German dictionary", which I
get with the local newspaper , under wine and it works OK. The problem
it is when I try to use the most important feature for me - the
pronunciation. When I try to listen to any word , no sound is played
and wine outputs the following to the console:
wodOpen unimplemented format: WAVE_FORMAT_ADPCM
I rewieved
2005 Jan 05
4
Encoding and decoding problem in speex 1.0.4
...decode
wav files that brought me to this site.
I am recording sound in the following format:-
m_WaveFormatEx.wFormatTag = WAVE_FORMAT_PCM;
m_WaveFormatEx.nChannels = 1;
m_WaveFormatEx.wBitsPerSample = 8;
m_WaveFormatEx.cbSize = 0;
m_WaveFormatEx.nSamplesPerSec = 8000;
m_WaveFormatEx.nBlockAlign = 1;
m_WaveFormatEx.nAvgBytesPerSec = 8000;
The recording is as follows :-
When the buffer(size = 2000 bytes) gets filled with sound data a
function with the body shown
below is called.
LPWAVEHDR lpHdr = (LPWAVEHDR) lParam;
if(lpH...
2009 Jan 20
0
VoIP with wavefrom and speex
...ed this way:
//Encoding
save_length = audio_encode(buffer,Hdr,Hdr->dwBytesRecorded,8);
//...
//Decode again:
save_length = audio_decode(Hdr,buffer,save_length);
Here are the waveform options:
waveform.nChannels = 1;
waveform.wFormatTag = WAVE_FORMAT_PCM;
waveform.wBitsPerSample = 16;
waveform.nSamplesPerSec = 8000;
waveform.nBlockAlign = (waveform.nChannels*waveform.wBitsPerSample)/8;
waveform.nAvgBytesPerSec = waveform.nSamplesPerSec*waveform.nBlockAlign;
waveform.cbSize = 0;
What am I doing wrong? Are there any examples for encoding a waveform pcm stream in realtime (I didn't found any)?
Than...
2012 Oct 25
2
WAVE PCM to OPUS and back
...s then decode it back to output wave header and play.
Doing it i hear only noise in my headphones. So how can i use Opus in
this way? Thanks in advance
WAVEFORMATEX waveform;
waveform.cbSize = 0;
waveform.wFormatTag = WAVE_FORMAT_PCM;
waveform.nChannels = 2;
waveform.wBitsPerSample = 8;
waveform.nSamplesPerSec = 48000;
waveform.nBlockAlign = waveform.nChannels * (waveform.wBitsPerSample >> 3);
waveform.nAvgBytesPerSec = waveform.nSamplesPerSec * waveform.nBlockAlign;
#define BUFSIZE 512
...
case MM_WIM_DATA:
{
WAVEHDR *Hdr = (WAVEHDR *) msg.lParam;...
2007 Nov 04
3
WaveIn/WaveOut and Speex
...d when I try to
Get PCM Char buffer from the microphone
Encode Char buffer using Speex
Decode Speex Char buffer into PCM char buffer
Play PCM char buffer using WaveOut
The end-result is very distorted sound.
I use the following PCM format:
waveFormat.nChannels = 1;
waveFormat.nSamplesPerSec = 8000;
waveFormat.wBitsPerSample = 8;
Once sound is aquired by the mic, I send it to Speex in a Char buffer.
It looks something like this:
Encode(char* inBuffer, DWORD bufferLength)
...
float* input = new float[frameSize];
ZeroMemory(input, frameSize);
...
for( )
{
input[..] = i...
2007 Nov 04
2
WaveIn/WaveOut and Speex
...t; Decode Speex Char buffer into PCM char buffer
>
> Play PCM char buffer using WaveOut
>
>
>
> The end-result is very distorted sound.
>
>
>
>
>
> I use the following PCM format:
>
>
>
> waveFormat.nChannels = 1;
>
> waveFormat.nSamplesPerSec = 8000;
>
> waveFormat.wBitsPerSample = 8;
>
>
>
> Once sound is aquired by the mic, I send it to Speex in a Char buffer.
> It looks something like this:
>
>
>
> Encode(char* inBuffer, DWORD bufferLength)
>
> ...
>
> float* input = new float[f...
2006 Nov 01
1
Integrating speex with VideoNet application: Constant background noise
...SIZE such that my callback function is called everytime 160 bytes of data is recorded.
Here's what I did in the initialisation (called only once).
m_waveFormatEx.wFormatTag =WAVE_FORMAT_PCM;
m_waveFormatEx.nChannels =1;
m_waveFormatEx.wBitsPerSample =8;
m_waveFormatEx.cbSize =0;
m_waveFormatEx.nSamplesPerSec =
8000;
m_waveFormatEx.nBlockAlign =1;
m_waveFormatEx.nAvgBytesPerSec = 8000;
int quality =8;
speex_bits_init(&bits);
enc_state = speex_encoder_init(&speex_nb_mode);
speex_encoder_ctl(enc_state, SPEEX_SET_QUALITY, &quality);
In my recording callback function
LRESULT RecordSound::OnS...
2006 Nov 02
1
Integrating speex with VideoNet application: Constantbackground noise
...my callback function is called everytime
160 bytes of data is recorded.
Here's what I did in the initialisation
(called only once).
m_waveFormatEx.wFormatTag
=WAVE_FORMAT_PCM;
m_waveFormatEx.nChannels
=1;
m_waveFormatEx.wBitsPerSample =8;
m_waveFormatEx.cbSize
=0;
m_waveFormatEx.nSamplesPerSec = 8000;
m_waveFormatEx.nBlockAlign
=1;
m_waveFormatEx.nAvgBytesPerSec = 8000;
int quality
=8;
speex_bits_init(&bits);
enc_state =
speex_encoder_init(&speex_nb_mode);
speex_encoder_ctl(enc_state,
SPEEX_SET_QUALITY, &quality);
In my recording callback
function
LRESULT Re...
2004 Dec 28
2
Sound distorted after normalized.
...lized, I turn on VBR, the speak become very
noisy immediately. Anyone has any idea? Also, DTX is
still not working. I have gone through the manual but
not much info on this area.
The following is my setting from sound card using
mm_system sdk.
WAVEFORMATEX *wfx = (WAVEFORMATEX *)input;
wfx->nSamplesPerSec = 8000;
wfx->nChannels = 1;
wfx->wFormatTag = WAVE_FORMAT_PCM;
wfx->wBitsPerSample = 16;
wfx->nBlockAlign = 2;
wfx->nAvgBytesPerSec = 16000;
Thanks in advance,
YueWeng
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile ph...
2005 Jan 05
0
Encoding and decoding problem in speex 1.0.4
...now much about windows "Wave" stuff, but this doesn't look right:
> m_WaveFormatEx.wFormatTag = WAVE_FORMAT_PCM;
> m_WaveFormatEx.nChannels = 1;
> m_WaveFormatEx.wBitsPerSample = 8;
> m_WaveFormatEx.cbSize = 0;
> m_WaveFormatEx.nSamplesPerSec = 8000;
> m_WaveFormatEx.nBlockAlign = 1;
> m_WaveFormatEx.nAvgBytesPerSec = 8000;
>
>
>
You want 16 bits per sample, and 16000 bytes per second...
-SteveK
2006 Oct 30
0
Integrating speex with VideoNet application: Constant background noise
...SIZE such that my callback function is called everytime 160 bytes of data is recorded.
Here's what I did in the initialisation (called only once).
m_waveFormatEx.wFormatTag =WAVE_FORMAT_PCM;
m_waveFormatEx.nChannels =1;
m_waveFormatEx.wBitsPerSample =8;
m_waveFormatEx.cbSize =0;
m_waveFormatEx.nSamplesPerSec = 8000;
m_waveFormatEx.nBlockAlign =1;
m_waveFormatEx.nAvgBytesPerSec = 8000;
int quality =8;
speex_bits_init(&bits);
enc_state = speex_encoder_init(&speex_nb_mode);
speex_encoder_ctl(enc_state, SPEEX_SET_QUALITY, &quality);
In my recording callback function
LRESULT RecordSound::OnSo...
2007 Nov 04
0
WaveIn/WaveOut and Speex
...t; Decode Speex Char buffer into PCM char buffer
>
> Play PCM char buffer using WaveOut
>
>
>
> The end-result is very distorted sound.
>
>
>
>
>
> I use the following PCM format:
>
>
>
> waveFormat.nChannels = 1;
>
> waveFormat.nSamplesPerSec = 8000;
>
> waveFormat.wBitsPerSample = 8;
>
>
>
> Once sound is aquired by the mic, I send it to Speex in a Char buffer.
> It looks something like this:
>
>
>
> Encode(char* inBuffer, DWORD bufferLength)
>
> ...
>
> float* input = new float[f...
2016 Jul 11
0
[PATCH] wave_out: fix casts
...nce, DWORD_PTR dwParam1, DWORD_PTR dwParam2 )
{
if ( uMsg == WOM_DONE ) {
EnterCriticalSection ( &cs );
@@ -125,7 +125,7 @@ Set_WIN_Params ( FILE_T dummyFile ,
outFormat.nBlockAlign = (outFormat.wBitsPerSample + 7) / 8 * outFormat.nChannels;
outFormat.nAvgBytesPerSec = outFormat.nSamplesPerSec * outFormat.nBlockAlign;
- switch ( waveOutOpen ( &dev, deviceID, &outFormat, (DWORD)wave_callback, 0, CALLBACK_FUNCTION ) )
+ switch ( waveOutOpen ( &dev, deviceID, &outFormat, (DWORD_PTR)wave_callback, 0, CALLBACK_FUNCTION ) )
{
case MMSYSERR_ALLOCATED: return Box ( "...
2007 Nov 04
0
WaveIn/WaveOut and Speex
...Play PCM char buffer using WaveOut
>>
>>
>>
>> The end-result is very distorted sound.
>>
>>
>>
>>
>>
>> I use the following PCM format:
>>
>>
>>
>> waveFormat.nChannels = 1;
>>
>> waveFormat.nSamplesPerSec = 8000;
>>
>> waveFormat.wBitsPerSample = 8;
>>
>>
>>
>> Once sound is aquired by the mic, I send it to Speex in a Char
>> buffer. It looks something like this:
>>
>>
>>
>> Encode(char* inBuffer, DWORD bufferLength)
>>...
2007 Nov 05
0
Fw: RE: WaveIn/WaveOut and Speex
...Play PCM char buffer using WaveOut
>>
>>
>>
>> The end-result is very distorted sound.
>>
>>
>>
>>
>>
>> I use the following PCM format:
>>
>>
>>
>> waveFormat.nChannels = 1;
>>
>> waveFormat.nSamplesPerSec = 8000;
>>
>> waveFormat.wBitsPerSample = 8;
>>
>>
>>
>> Once sound is aquired by the mic, I send it to Speex in a Char
>> buffer. It looks something like this:
>>
>>
>>
>> Encode(char* inBuffer, DWORD bufferLength)
>>...
2006 Nov 05
1
Integrating speex with VideoNet application: Constantbackground noise
...k function is called
everytime 160 bytes of data is recorded.
Here's what I did in the
initialisation (called only once).
m_waveFormatEx.wFormatTag
=WAVE_FORMAT_PCM;
m_waveFormatEx.nChannels
=1;
m_waveFormatEx.wBitsPerSample =8;
m_waveFormatEx.cbSize
=0;
m_waveFormatEx.nSamplesPerSec = 8000;
m_waveFormatEx.nBlockAlign
=1;
m_waveFormatEx.nAvgBytesPerSec = 8000;
int quality
=8;
speex_bits_init(&bits);
enc_state =
speex_encoder_init(&speex_nb_mode);
speex_encoder_ctl(enc_state,
SPEEX_SET_QUALITY, &quality);
In my recording callback
function...
2007 Nov 05
2
WaveIn/WaveOut and Speex
...Play PCM char buffer using WaveOut
>>
>>
>>
>> The end-result is very distorted sound.
>>
>>
>>
>>
>>
>> I use the following PCM format:
>>
>>
>>
>> waveFormat.nChannels = 1;
>>
>> waveFormat.nSamplesPerSec = 8000;
>>
>> waveFormat.wBitsPerSample = 8;
>>
>>
>>
>> Once sound is aquired by the mic, I send it to Speex in a Char
>> buffer. It looks something like this:
>>
>>
>>
>> Encode(char* inBuffer, DWORD bufferLength)
>>...
2006 Dec 24
1
Integrating speex with VideoNet application: Constantbackground noise
...k function is called
everytime 160 bytes of data is recorded.
Here's what I did in the
initialisation (called only once).
m_waveFormatEx.wFormatTag
=WAVE_FORMAT_PCM;
m_waveFormatEx.nChannels
=1;
m_waveFormatEx.wBitsPerSample =8;
m_waveFormatEx.cbSize
=0;
m_waveFormatEx.nSamplesPerSec = 8000;
m_waveFormatEx.nBlockAlign
=1;
m_waveFormatEx.nAvgBytesPerSec = 8000;
int quality
=8;
speex_bits_init(&bits);
enc_state =
speex_encoder_init(&speex_nb_mode);
speex_encoder_ctl(enc_state,
SPEEX_SET_QUALITY, &quality);
In my recording callback
function...