Thread: PlaySound() Limitations

  1. #1
    Registered User
    Join Date
    Dec 2006
    Location
    Scranton, Pa
    Posts
    252

    PlaySound() Limitations

    Hidi Ho, People. Straight to the problem, after spending some time extracting some audio data from game files, I came to the problem that some of the audio data is straight pcm and others are ima adpcm. I knew this beforehand, but what I didn't know was that PlaySound isn't capable of playing anything other than pcms. I was able to extract the ima adpcm data and export with proper header (verified integrity as they play fine in CoolEdit), so basically I'm looking to play all the wavs within the program I wrote.

    Anyhoo, I'm hoping that there's a simple solution to this as I'm really unfamiliar with audio code and I'm pretty much assuming that converting the ima adpcms to pcm would require a bit more programming savvy than I possess. Any suggestions or solutions I'd welcome.

    Thanks.

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Quote Originally Posted by Oldman47 View Post
    I'm pretty much assuming that converting the ima adpcms to pcm would require a bit more programming savvy than I possess. Any suggestions or solutions I'd welcome.
    Don't you have any wave-converter program that understands the adpcm format and could convert it to pcm in batch?
    writing a 3 line batch file should not be a big of the programming challenge?
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    Registered User
    Join Date
    Dec 2006
    Location
    Scranton, Pa
    Posts
    252
    Don't you have any wave-converter program that understands the adpcm format and could convert it to pcm in batch?
    writing a 3 line batch file should not be a big of the programming challenge?
    No, but that isn't a bad idea, vart. Using a *bat to launch another conversion utility would certainly negate my having to write up my own conversion code (which I'm uncertain how to do anyhow - I'm going to read up on the actual format just the same).

    Thanks for the suggestion. ..

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. PlaySound doesn't play when called!
    By Queatrix in forum Windows Programming
    Replies: 7
    Last Post: 03-03-2006, 08:02 PM
  2. PlaySound unresolved symbol
    By curlious in forum Windows Programming
    Replies: 4
    Last Post: 10-04-2003, 03:29 PM
  3. PlaySound error
    By Shadow12345 in forum Windows Programming
    Replies: 5
    Last Post: 10-02-2002, 07:10 AM
  4. PlaySound function & Console App
    By GaPe in forum Windows Programming
    Replies: 2
    Last Post: 06-26-2002, 12:25 PM
  5. Theoretical limitations of malloc()?
    By The V. in forum C++ Programming
    Replies: 2
    Last Post: 10-16-2001, 10:38 PM