Community

SCI Programming => SCI Development Tools => Topic started by: MusicallyInspired on May 25, 2021, 07:10:16 PM

Title: Set channel properties for Sound resources in Companion?
Post by: MusicallyInspired on May 25, 2021, 07:10:16 PM
I may have brought this up before, I don't remember. I discovered while streaming today that Companion doesn't seem to have the ability to alter channel properties on Dound resources. Mainly the "Initial Voices" value. This is important for Adlib because if it's not set no notes will be played at all. Ravi's SoundBox program can set this but it's only compatible with SCI0 Sound resources, which makes it unhelpful for SCI1+ games.

What the Initial Voices value does is set the polyphony limit for the channel it's set on. I think Adlib has a maximum limit of 8 voices across all Adlib channels total. I think some stereo OPL drivers (sndblast?) ignore this and have a higher polyphony limit but I'd like to be able to to support the original mono adl.drv driver too.

Unless Companion already supports this and I've missed it lol. The source for SoundBox is freely available so I'm going to take a look at it later tonight too.
Title: Re: Set channel properties for Sound resources in Companion?
Post by: MusicallyInspired on May 27, 2021, 07:02:27 PM
Thankfully, it seems that setting the "initial voices" flag on each channel is handled right in the header of each sound resource (which makes sense) so it is probably easy enough to add this functionality to Companion for SCI0 resources anyway. I'm checking out the source to see how Companion handles SCI1 sound resources to see if I can find where(/if) it sets this flag there...

EDIT: Kawa, I'm trying to open your Companion fork source in Visual Studio but it's giving me errors saying it can't find any DIALOGs. Any idea what's going on there? I don't have much experience working with MFC program stuff...
Title: Re: Set channel properties for Sound resources in Companion?
Post by: Kawa on May 28, 2021, 08:05:13 AM
Kawa, I'm trying to open your Companion fork source in Visual Studio but it's giving me errors saying it can't find any DIALOGs. Any idea what's going on there? I don't have much experience working with MFC program stuff...
I got nothing. I open it in 2015 Community and I can build all three variations, regular mild and kawa, with no issues 🤷‍♀️
Title: Re: Set channel properties for Sound resources in Companion?
Post by: troflip on May 28, 2021, 07:04:33 PM
Make sure you have the MFC components installed for your visual studio.
Title: Re: Set channel properties for Sound resources in Companion?
Post by: MusicallyInspired on May 28, 2021, 11:40:03 PM
I do. I had to do so to open the SoundBox source. And I can see those Dialogs just fine. But with Companion when I try to open anything it says it can't find any Dialogs and gives me the option to just edit the code instead. I guess I should try and earlier version then.