Author Topic: sciAudio - a new way to put sound in your games!  (Read 53331 times)

0 Members and 1 Guest are viewing this topic.

Offline gumby

Re: sciAudio - a new way to put sound in your games!
« Reply #60 on: April 17, 2015, 02:00:42 PM »
By the way, sciAudio is still having occasional problems where it'll either fail to play a sound or fail to exit when the game closes.  I think the failure to play is caused by not being able to write to the conductor file.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Collector

Re: sciAudio - a new way to put sound in your games!
« Reply #61 on: April 17, 2015, 04:24:02 PM »
Are you closing the file after every write? Could it be an issue with UAC? What if the file was written in the temp dir? Another possibility, is the file getting locked by any other process?
« Last Edit: April 17, 2015, 04:25:49 PM by Collector »
KQII Remake Pic

Offline gumby

Re: sciAudio - a new way to put sound in your games!
« Reply #62 on: April 17, 2015, 04:27:03 PM »
Yeah, it could be any of those.  I haven't had a chance to troubleshoot very much yet, been just 'go-go-go' with getting Soulshade Asylum completed.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Cloudee1

Re: sciAudio - a new way to put sound in your games!
« Reply #63 on: May 13, 2015, 07:53:29 AM »
I also see opportunity for one more additional feature.  Pausing the game should ideally pause the audio as well.  Not sure if I can pause the audio playback, but I'll take a look.

Have you had a chance to ponder this pause idea yet. I have found a use for it.

Now that I now had to add cue points to a midi track and actually code against them I can sync the music to the action in the game. However when a print dialog appears on the screen, the midi track is paused however the sciaudio is not. Thereby throwing off the synchronization.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline troflip

Re: sciAudio - a new way to put sound in your games!
« Reply #64 on: June 03, 2016, 02:25:35 PM »
For this other little project I was working on
http://sciprogramming.com/community/index.php?topic=1618.msg9332#msg9332

I thought about how to implement audio, and I was going to offer support for sciAudio (e.g. just make it work automatically, because why not? I could do so by intercepting file system calls and seeing if it's writing to the conductor file, etc....).

But looking at what it takes to set up sciAudio and how it works, it seems like it could be simpler. It looks like most of the functionality could be abstracted away in the Sound class itself, and you wouldn't need to special case "sci audio" sounds. Your wav/mp3 files (it looks like they need to be renamed to .sciaudio, but I'm not sure why that decision was made) could just be numbered (or prefixed with a number) and plopped in the main game folder. e.g. 104_GunShot.wav. Then when you play sound 104, it would check to see if there is a file corresponding to that number, and send the info over to sciaudio instead of calling the DoSound kernel. Or rather, calls to DoSound could be replaced with calls to DoSoundCustom, which either forwards to DoSound or sciAudio. Basically, it would mean supporting all the DoSound functionality and forwarding to sci audio instead.

Of course, there are some features like fadein/fadeout times that the Sound class doesn't support (though it could be extended to do so).

Anyway, I just thought of this as I was looking how to support sciAudio - and instead I realized it would be much easier to just support wav files in the DoSound kernel - it's a little more seamless to write scripts against (and it's basically what Sierra did when they started supporting digital audio). And then I thought why couldn't sciAudio do the same? But I haven't used it, so maybe I'm overlooking something? If Gumby pops in again, maybe he could comment? Or maybe someone wants to take this up on their own? It might only require changes to the sci scripts.
« Last Edit: June 03, 2016, 05:15:20 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: sciAudio - a new way to put sound in your games!
« Reply #65 on: June 03, 2016, 05:44:26 PM »
Basically HD texture packs then, but for sound resources. Implementation-wise, that is.

Offline gumby

Re: sciAudio - a new way to put sound in your games!
« Reply #66 on: June 04, 2016, 01:11:22 PM »
Anyway, I just thought of this as I was looking how to support sciAudio - and instead I realized it would be much easier to just support wav files in the DoSound kernel - it's a little more seamless to write scripts against (and it's basically what Sierra did when they started supporting digital audio). And then I thought why couldn't sciAudio do the same? But I haven't used it, so maybe I'm overlooking something? If Gumby pops in again, maybe he could comment? Or maybe someone wants to take this up on their own? It might only require changes to the sci scripts.

If I understand correctly, your question is can we integrate the calls to sciAudio into the Sound class and removing the need for a separate script file (sciAudio.sc)?  I think that should be possible.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline troflip

Re: sciAudio - a new way to put sound in your games!
« Reply #67 on: June 05, 2016, 12:16:01 AM »
Correct. I think it could all be hidden inside the Sound class (or possibly even in a wrapper around DoSound kernel, although that might be more complicated), and then be seamless to integrate - people could just switch over their sounds one by one by removing the midi resource, and adding a mp3/wav file that somehow uses that same number.

Slight downside of course is that you're referencing a number from script instead of a meaningful name - but having it work just like digital audio works in SCI1.1 seems like it could be a good thing.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Collector

Re: sciAudio - a new way to put sound in your games!
« Reply #68 on: June 05, 2016, 01:18:59 AM »
Of course now that we have SCI1.1 how much will people need or want to use sciAudio? It was a great thing when we were limited to SCI0 and people were struggling with Soundbox and the limitations of what small wav samples could be embedded in a sound resource. And it does not take ScummVM into account.

If we do expand support for it, would it change the usage of the conductor files? How would it affect the termination of sciAudio on exit as there has been a problem with continuing after the game has exited. I did an inelegant solution with the DOSBox launcher for sciAudio to kill the process on DOSBox exit. This was also inexact as I had no easy way to distinguish between two instances of DOSBox running at the same time.
KQII Remake Pic

Offline Kawa

Re: sciAudio - a new way to put sound in your games!
« Reply #69 on: June 05, 2016, 09:09:06 AM »
Kinda makes me feel like hacking ScummVM.

Kinda.

Just a little.

Offline Collector

Re: sciAudio - a new way to put sound in your games!
« Reply #70 on: June 05, 2016, 12:26:50 PM »
Bored again?
KQII Remake Pic

Offline troflip

Re: sciAudio - a new way to put sound in your games!
« Reply #71 on: June 05, 2016, 02:28:49 PM »
Hacking ScummVM for what? It already supports sciAudio. Nothing would change.

If we do expand support for it, would it change the usage of the conductor files? How would it affect the termination of sciAudio on exit as there has been a problem with continuing after the game has exited. I did an inelegant solution with the DOSBox launcher for sciAudio to kill the process on DOSBox exit. This was also inexact as I had no easy way to distinguish between two instances of DOSBox running at the same time.

Nothing would change with the conductor files.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: sciAudio - a new way to put sound in your games!
« Reply #72 on: June 05, 2016, 02:36:27 PM »
Hacking ScummVM not to use sciAudio or anything, but to intercept DoSound calls and play an external track where available. So if you do (gMusic number: 4 play:), and there's a track-4.ogg or whatever, it'll play that instead of sound resource 4. No sciAudio.

And yes I'm bored, but not (that) suicidal.

Offline troflip

Re: sciAudio - a new way to put sound in your games!
« Reply #73 on: June 05, 2016, 02:49:53 PM »
Ah, makes sense. It's probably not *that* difficult, given that it already has logic to do the exact same thing for Sierra's digital audio resources.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Collector

Re: sciAudio - a new way to put sound in your games!
« Reply #74 on: June 05, 2016, 03:39:58 PM »
Also some of the SVM supported games that people did "enhanced" digital sound tracks to replace the original internal MIDI.
KQII Remake Pic


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.046 seconds with 24 queries.