Added some debug output to loopwave.c
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404001
This commit is contained in:
parent
e1d8dd9b8a
commit
edf88f55b0
1 changed files with 12 additions and 1 deletions
|
@ -64,9 +64,14 @@ poked(int sig)
|
||||||
done = 1;
|
done = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#define NAMESIZE 32
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
char name[NAMESIZE];
|
||||||
|
|
||||||
/* Load the SDL library */
|
/* Load the SDL library */
|
||||||
if (SDL_Init(SDL_INIT_AUDIO) < 0) {
|
if (SDL_Init(SDL_INIT_AUDIO) < 0) {
|
||||||
fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
|
fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
|
||||||
|
@ -101,9 +106,15 @@ main(int argc, char *argv[])
|
||||||
SDL_FreeWAV(wave.sound);
|
SDL_FreeWAV(wave.sound);
|
||||||
quit(2);
|
quit(2);
|
||||||
}
|
}
|
||||||
SDL_PauseAudio(0);
|
|
||||||
|
/* Right now we're using the 1.2 SDL_OpenAudio(), but if we move to the
|
||||||
|
1.3 device enumeration version, we shouldn't hardcore device id #1 for
|
||||||
|
SDL_GetAudioDeviceName(), below. */
|
||||||
|
printf("Using audio driver: %s\n", SDL_AudioDriverName(name, NAMESIZE));
|
||||||
|
printf("Using audio device: %s\n", SDL_GetAudioDeviceName(1, 0));
|
||||||
|
|
||||||
/* Let the audio run */
|
/* Let the audio run */
|
||||||
|
SDL_PauseAudio(0);
|
||||||
while (!done && (SDL_GetAudioStatus() == SDL_AUDIO_PLAYING))
|
while (!done && (SDL_GetAudioStatus() == SDL_AUDIO_PLAYING))
|
||||||
SDL_Delay(1000);
|
SDL_Delay(1000);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue