Sonic and Sega Retro Message Board: ADX player library? - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Page 1 of 1
    Locked
    Locked Forum

ADX player library? I need one

#1 User is offline MainMemory 

Posted 07 May 2014 - 10:59 AM

  • Every day's the same old thing... Same place, different day...
  • Posts: 4247
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
For a long time now, I've been wanting to mod the PC version of Sonic Adventure DX to play music in looped ADX format, rather than WMA. I finally understand enough of how SADX interfaces with Windows Media Player that I think I could replace or supplement it, but looking at vgmstream, I have no idea how it works, or for that matter how DirectSound or any other audio library works.

I just need something that can load an ADX file (other formats optional) and play, pause, resume and stop. It doesn't even have to be open source.

#2 User is offline Overlord 

Posted 07 May 2014 - 12:55 PM

  • Substitute Meerkovo IT Chief
  • Posts: 17144
  • Joined: 12-January 03
  • Gender:Male
  • Location:Berkshire, England
  • Project:VGDB
  • Wiki edits:3,204
http://www.hcs64.com/vgmstream.html may or may not help - it's open source, and it does a load of different formats, but it's also plugins for existing media players so not sure if it's any use.

#3 User is offline MainMemory 

Posted 07 May 2014 - 01:27 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 4247
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
Perhaps you missed the part where I said I had looked at vgmstream already and couldn't figure it out?

#4 User is offline Overlord 

Posted 07 May 2014 - 01:30 PM

  • Substitute Meerkovo IT Chief
  • Posts: 17144
  • Joined: 12-January 03
  • Gender:Male
  • Location:Berkshire, England
  • Project:VGDB
  • Wiki edits:3,204
Frig, I'm an idiot. Disregard then =P

#5 User is offline Herm the Germ 

Posted 07 May 2014 - 02:13 PM

  • Hmm, not bad. Well done, doctor!
  • Posts: 1482
  • Joined: 22-April 09
  • Gender:Male
  • Location:Dresden, Saxony, Germany
  • Project:MIDI-to-SMPS-conversions, mostly. Takin' requests, too.
  • Wiki edits:5
I found SWAT's old ADX Tool pack in a folder on my hard drive, along with some additional files I didn't sort out; maybe that'll be of some help?

#6 User is offline sonicblur 

Posted 07 May 2014 - 06:57 PM

  • Posts: 1240
  • Joined: 18-February 08
  • Gender:Male
  • Wiki edits:6
I wrote this for Gamecube, but it's ridiculously simple such that you'll be able to use it:
http://projects.sapp...om/gcn/adxlib.c

Based on ADX2WAV, which I may still have the code for if you want me to dig for it. I used it in the Gamecube Disc Browser for it's ADX player.

I also have Java and C# ports of ADX code, if you'd rather have me dig that up. (If I can find it)

#7 User is offline MainMemory 

Posted 07 May 2014 - 07:59 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 4247
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
Unfortunately that code doesn't have anything for outputting sound on Windows which is half of my problem. ADX2WAV probably wouldn't help, and Java or C# code would only help if it contained DirectSound code that I could port to C++. I might be able to use the version of vgmstream that angryzor made for the S&KC HQ music hack using BASS, I'm not sure.

#8 User is offline sonicblur 

Posted 07 May 2014 - 10:41 PM

  • Posts: 1240
  • Joined: 18-February 08
  • Gender:Male
  • Wiki edits:6

View PostMainMemory, on 07 May 2014 - 07:59 PM, said:

Unfortunately that code doesn't have anything for outputting sound on Windows which is half of my problem. ADX2WAV probably wouldn't help, and Java or C# code would only help if it contained DirectSound code that I could port to C++. I might be able to use the version of vgmstream that angryzor made for the S&KC HQ music hack using BASS, I'm not sure.

But that's the easy part. The most complex part of any ADX player is the decoder, if you want to play it you just write the stream out to whatever sound library you want to use.
http://stackoverflow...udio-on-windows

You'll find plenty of samples on how to do this. It's all basically the same... initialize, fill the buffer, start playing, and when the buffer gets low add more to it. Even if you don't find a RAW example, a WAV example is practically the same thing, you just don't need to worry about parsing the header.

#9 User is offline MainMemory 

Posted 07 May 2014 - 11:43 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 4247
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
Well I got a test program running with BASS + vgmstream so at this point any problems I encounter will likely be with SADX itself, which none of you are likely to be able to help with.

Page 1 of 1
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users