SDL_mixer questions

  1. How can I exclude from final library some sound formats? (VC++6 or NET)
    Basically I want only MIDI & OGG.

1.a This question extends to main SDL (e.g. remove joystick or mouse)

  1. I saw something like timidity and I dont know what is this. I suppose, this is wav samples for every music note of MIDI (I am not very familiar with sound terminology) which in normal situation will be composed from hardware. Am I correct?

  2. There is a “native” MIDI. What is the difference?

Hello !

  1. I saw something like timidity and I dont know what is this.
    I suppose, this is wav samples for every music note of MIDI (I am
    not very familiar with sound terminology) which in normal situation
    will be composed from hardware. Am I correct?

  2. There is a “native” MIDI. What is the difference?

Timidity is a MIDI “emulator”. It allows people to play MIDIs on
Soundcards that don?t have a MIDI chip on them. For example
when you only have a sound card that allows only stereo wave output,
like most notebook soundcards do.

CU

Hello !

1.a This question extends to main SDL (e.g. remove joystick or mouse)

Normally you don?t need this, because Joystick
or Mouse access doesn?t need any external libs.

CU

Timidity is a MIDI “emulator”. It allows people to play MIDIs on
Soundcards that don?t have a MIDI chip on them. For example
when you only have a sound card that allows only stereo wave output,
like most notebook soundcards do.

More to the point, Timidity is CPU-intensive, whereas using the "native"
stuff (which means "hand it off to Windows (etc) to do the work) might
dump it to audio hardware for rendering.

–ryan.

I have a number of questions about using SDL_mixer, if anyone has time:

If you are creating custom Mix_Chunk from a buffer using Mix_QuickLoad_RAW((), what sizes can the buffer be? Should I just
pick ((samplerate * channels * samplesize * 1000) / n) to create a Mix_Chunk n milliseconds long, or need it align along
some other boundaries as well?

What happens when I call Mix_PlayChannel() to play another Mix_Chunk while one is still playing on that channel? Is the
older chunk dropped? Is the new chunk dropped? Is the new one queued to play after the old one finishes?

Last, does this sound problem ring a bell to anyone?
Another computer on my LAN sends me about 1000 bytes per packet of a 25 second AIFF file on loop. Mix_QuickLoad_Raw()
creates a Mix_Chunk with a packet’s data, Mix_PlayChannel() plays it on a fixed channel, and then I wait for the next packet.
The AIFF file is the same format as SDL_mixer was started (22050 Hz, Mono, AUDIO_S16SYS)
The resulting sound is still similar to the original, but must faster and more distorted.

Thanks,
John
---- Introducing Spymac MailPro: http://www.spymac.com/mailpro/

[…]
(Can’t help much with these. Not very familiar with SDL_mixer.)

[…]

Last, does this sound problem ring a bell to anyone?
Another computer on my LAN sends me about 1000 bytes per packet of
a 25 second AIFF file on loop. Mix_QuickLoad_Raw() creates a
Mix_Chunk with a packet’s data, Mix_PlayChannel() plays it on a
fixed channel, and then I wait for the next packet. The AIFF file
is the same format as SDL_mixer was started (22050 Hz, Mono,
AUDIO_S16SYS) The resulting sound is still similar to the original,
but must faster and more distorted.

Rings a few bells, actually; there are several ways of ending up with
this kind of behavior.

* Are you sure you're interpretting the incoming packets
  as the right sample format?

* Are you translating the packet size into samples (or
  whetever you deal in) correctly?

* What keeps the two computers in sync? Sounds like the
  "other" computer sends data faster than it should be
  played -  or you'd quickly run out of data if you
  actually play it too fast.

* Could it be that each buffer starts playing right after
  it is received, rather than right after the last buffer
  has been played? That would cause buffers to overlap or
  cut each other off, depending on how the playback/mixing
  is done.

* Is your packet receive code blocking as it should, so
  that you always get full buffers?

//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,… |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Wednesday 25 August 2004 07.54, John Philip wrote: