FAQ Search Memberlist Usergroups
Jolt Country Forum Index
Register Profile Log in to check your private messages Log in
Log in Log in

dealing with unsuccessful music/sound calls

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors
View previous topic :: View next topic  
Author Message
Roody_Yogurt



Joined: 29 Apr 2002
Posts: 1993
Location: Milwaukee

PostPosted: Sun Mar 03, 2013 12:21 am    Post subject: dealing with unsuccessful music/sound calls Reply with quote

You can always check display.hasgraphics to see if the current interpreter supports graphics. There isn't really a comparable function for audio. Now, most multimedia Hugo games don't acknowledge the fact that music/sound is supposed to be playing, but if a game does, it looks pretty stupid if the terp can't actually play sound/music.

In The Next Day, I just had a is-this-a-simple-interpreter? check before I ask the player if they'd like to play music. What I didn't realize is that terps like the graphical DOS terp aren't simple terps (by Hugo standards) but can only play certain types of music (Guilty Bastard's mods work fine, but my MIDI file in The Next Day or CHUMS' music don't seem to work).

Looking into the issue, it looks like the terp does set the system_status global to true if a music call is unsuccessful. This is used by PlayMusic to determine whether or not the routine returns true or false. You can check for either of these things before you go and print something.

Of course, you wouldn't want to play music before you ask "do you want to play music?", so I'm thinking, if I were to do this in the future, I would include in my resource file a second long file of the type I'll be playing, but it'll be silent so the game can test whether or not that file type works and act accordingly. I already have a silent midi file I picked up somewhere. An mp3 or wav would be easy to make, and I imagine everything else is possible, too.

This is probably an issue that won't come up for anyone else, but I wanted to share this workaround.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001 phpBB Group

Theme by Kage Musha - RPG Garden

Copyrights and trademarks are all of the belonging company. No copyright Infringement intended