Hi,
When I try to open a wave file, I get the following error:
“Fatal signal: Segmentation Fault (SDL Parachute Deployed)”
The specific code I use is:
SDL_AudioSpec *wav_spec;
Uint32 wav_length;
Uint8 *wav_buffer;
if( SDL_LoadWAV("newcough4.wav", wav_spec, &wav_buffer,
&wav_length) == NULL ){
fprintf(stderr, “Could not open test.wav: %s\n”,
SDL_GetError());
exit(-1);
}
Which was the sample code on the SDL pages…
The WAV file is the following format: “IMA ADPCM 8.000 kHz, 4 Bit,
Stereo”
Any suggestions?
Does anyone have a small working sample of opening a wave file that I
could look at?
Thanks,
Will
You can try:
SDL_AudioSpec wav_spec; <<— Not *wav_spec
Uint32 wav_length;
Uint8 *wav_buffer;
if( SDL_LoadWAV( "newcough4.wav", &wav_spec, &wav_buffer,
&wav_length) == NULL ){ <<<— Not wav_spec
I think you has to give a valid audio spec var where returns the values.
Hope this helps,
Jorge
"William Clayton"
<William.Clayton at student Para: <sdl at libsdl.org>
s.olin.edu> cc:
Enviado por: Asunto: [SDL] Problems with WAV files...
sdl-admin at libsdl.org
05/12/2003 09.12
Por favor, responda a
sdl
Hi,
When I try to open a wave file, I get the following error:
“Fatal signal: Segmentation Fault (SDL Parachute Deployed)”
The specific code I use is:
SDL_AudioSpec *wav_spec;
Uint32 wav_length;
Uint8 *wav_buffer;
if( SDL_LoadWAV("newcough4.wav", wav_spec, &wav_buffer,
&wav_length) == NULL ){
fprintf(stderr, “Could not open test.wav: %s\n”,
SDL_GetError());
exit(-1);
}
Which was the sample code on the SDL pages…
The WAV file is the following format: “IMA ADPCM 8.000 kHz, 4 Bit, Stereo”
Any suggestions?
Does anyone have a small working sample of opening a wave file that I could
look at?
Thanks,
Will
are you sure, you got the example from the SDL
examples , because i tried that myself a while ago and
it worked without any problem.
— William Clayton
<William.Clayton at students.olin.edu> wrote: > Hi,>
When I try to open a wave file, I get the following
error:
“Fatal signal: Segmentation Fault (SDL Parachute
Deployed)”
The specific code I use is:
SDL_AudioSpec *wav_spec;
Uint32 wav_length;
Uint8 *wav_buffer;
if( SDL_LoadWAV("newcough4.wav",
wav_spec, &wav_buffer,
&wav_length) == NULL ){
fprintf(stderr, “Could not open
test.wav: %s\n”,
SDL_GetError());
exit(-1);
}
Which was the sample code on the SDL pages…
The WAV file is the following format: “IMA ADPCM
8.000 kHz, 4 Bit,
Stereo”
Any suggestions?
Does anyone have a small working sample of opening a
wave file that I
could look at?
Thanks,
Will
Download Yahoo! Messenger now for a chance to win Live At Knebworth DVDs
http://www.yahoo.co.uk/robbiewilliams
MessageDid you set aside any memory for your wav_buffer somewhere else in
your program? Otherwise your writing to a pointer that could be pointing
anywhere in memory.
Jason.-----Original Message-----
From: sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org]On Behalf Of
William Clayton
Sent: Friday, December 05, 2003 12:12 AM
To: sdl at libsdl.org
Subject: [SDL] Problems with WAV files…
Hi,
When I try to open a wave file, I get the following error:
“Fatal signal: Segmentation Fault (SDL Parachute Deployed)”
The specific code I use is:
SDL_AudioSpec *wav_spec;
Uint32 wav_length;
Uint8 *wav_buffer;
if( SDL_LoadWAV("newcough4.wav", wav_spec, &wav_buffer,
&wav_length) == NULL ){
fprintf(stderr, “Could not open test.wav: %s\n”,
SDL_GetError());
exit(-1);
}
Which was the sample code on the SDL pages…
The WAV file is the following format: “IMA ADPCM 8.000 kHz, 4 Bit, Stereo”
Any suggestions?
Does anyone have a small working sample of opening a wave file that I
could look at?
Thanks,
Will
Thanks for your help. I’ve gotten ride of that problem, unfortunately I
can’t seem to actually get the sound to output. All I hear is a series
of clicks. I used a program structure similar to the example here:
http://www.libsdl.org/intro/usingsound.html. I’m using an 8-bit WAV
file. Using the convention from that example, I get values for the data
array that range from 0 to 255 and the array is of the appropriate
length. When I try to write the elements of this data array to my audio
buffer, all I get for output is a series of clicks…
Thanks,
Will> ----- Original Message -----
From: jorgefm@cirsa.com [mailto:jorgefm at cirsa.com]
Sent: Friday, December 05, 2003 3:39 AM
To: sdl at libsdl.org
Subject: Re: [SDL] Problems with WAV files…
You can try:
SDL_AudioSpec wav_spec; <<— Not *wav_spec
Uint32 wav_length;
Uint8 *wav_buffer;
if( SDL_LoadWAV( "newcough4.wav", &wav_spec, &wav_buffer,
&wav_length) == NULL ){ <<<— Not wav_spec
I think you has to give a valid audio spec var where returns the values.
Hope this helps,
Jorge
"William Clayton"
<William.Clayton at student Para:
s.olin.edu> cc:
Enviado por: Asunto: [SDL]
Problems with WAV files…
sdl-admin at libsdl.org
05/12/2003 09.12
Por favor, responda a
sdl
Hi,
When I try to open a wave file, I get the following error: “Fatal
signal: Segmentation Fault (SDL Parachute Deployed)”
The specific code I use is:
SDL_AudioSpec *wav_spec;
Uint32 wav_length;
Uint8 *wav_buffer;
if( SDL_LoadWAV("newcough4.wav", wav_spec, &wav_buffer,
&wav_length) == NULL ){
fprintf(stderr, “Could not open test.wav: %s\n”,
SDL_GetError());
exit(-1);
}
Which was the sample code on the SDL pages…
The WAV file is the following format: “IMA ADPCM 8.000 kHz, 4 Bit,
Stereo”
Any suggestions?
Does anyone have a small working sample of opening a wave file that I
could look at?
Thanks,
Will
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl