[SDL] sdl_perl windows version

simon_nie simon_nie at sina.com
Sun Nov 30 18:11:01 PST 2003


Hi!

I still have problems to play a raw audio file.

This is my code:
-------------- snip ---------------------------
  Sound_AudioInfo *WantedSpec_HZ;
  Sound_Sample  *sample;

  Sound_Init();

  WantedSpec_HZ           =
(Sound_AudioInfo*)malloc(sizeof(Sound_AudioInfo));
  WantedSpec_HZ->rate     = 44100;
  WantedSpec_HZ->format   = AUDIO_U16MSB;
  WantedSpec_HZ->channels = 1;

  sample =
Sound_NewSampleFromFile(UserSystemPtr->Sfx.SampleSlots[Pos_HZ],
WantedSpec_HZ, 8192);
  Sound_DecodeAll(sample);
  Sound_FreeSample(sample);
  Sound_Quit();
------------------- snip ---------------
A soundfile can be downloaded on
http://athene.dnsalias.org/MausKlick.raw.gz
The file is a 16 bit sound file in big-endian format (created on an
Amiga).

Currently I get no errors with the code above but I cannot hear any
noise :(
I think it is yet not necessary to turn big-endian into little-endian
because I just want to hear a kind of noise.

So I hope someone can give me a hint.

Thanks and regards,
Hauke
-- 
Aus Ben Hur (1959): Wer nicht fuer Rom ist, ist gegen Rom
George W. Bush (2002): Wer nicht fuer uns ist, ist gegen uns





More information about the SDL mailing list