How can I play gsm610,a dpcm,ulaw,alaw

You need to save your received data to a file, convert it (maybe) using algorithms you can find on the web, then save the converted data and play it using SDL_mixer or whatever.

It’ll be very processor intensive, not to say error prone due to network latency and many many other issues. This kind of stuff is a can of worms.

Ed> ----- Original Message -----

From: erbiaohu@gmail.com (erbiao hu)
To: sdl at lists.libsdl.org
Sent: Monday, 30 July, 2007 7:59:17 PM
Subject: [SDL] how can I play gsm610?adpcm?ulaw?alaw

hi guys?

how can I play gsm610?adpcm?ulaw?alaw voice data received via TCP/IP use SDL,now i just can play pcm voice data.

Thanks very much.

  ___________________________________________________________ 

Yahoo! Mail is the world’s favourite email. Don’t settle for less, sign up for
your free account today http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html

You need to save your received data to a file, convert it (maybe) using
algorithms you can find on the web, then save the converted data and
play it using SDL_mixer or whatever.

You absolutely do NOT have to save it to a file! SDL_mixer can read from
memory buffers directly (it wants an SDL_rwops structure, which just
bridges from any input source…file and memory rwops support is built
into SDL).

Although most (all?) of the formats that were listed aren’t supported by
SDL_mixer, so you might as well just decode to PCM and feed it to SDL
directly. Things like adpcm are fairly easy to decode manually in a few
lines of C code.

–ryan.