From: Roger Braun Date: 2010-08-30T04:18:01+09:00 Subject: Re: Playing raw PCM files in ruby On Sun, Aug 29, 2010 at 8:58 PM, Michael Morin wrote: > You might be better off converting these sounds to something that can be > handled more easily.  You could use a command-line tool like Sox to do the > job, just iterate over the files (in Ruby, perhaps) and convert them to wav > files.  This has the added benefit of possibly encoding them in MP3 or Ogg > Vorbis for smaller file sizes. Thanks for the suggestion, but I would really like to play the files directly from the games archive format. > > Raw PCM should be able to be handled though.  The problem is, raw PCM has no > header information.  If you know the exact format, you could theoretically > load it into memory and have it played, but it'll be a pain.  If you get any > of the settings wrong, you might as well be pumping random noise through > your speakers. That's exactly what I want to do, but I found no way to actually do this. Wrong settings are no problem here, because all the music files in the game use the same format and the program is just supposed to play these songs. -- Roger Braun http://rbraun.net roger.braun@student.uni-tuebingen.de