GLBasic forum

Main forum => Bug Reports => Topic started by: Hemlos on 2008-Oct-18

Title: musicvolume
Post by: Hemlos on 2008-Oct-18
i dont think musicvolume is working, i try all ways integer and decimal.

i set to 1, and midis started working incredibly, now they can never be turned back down to 0, its permanently stuck at max volume.
Title: Re: musicvolume
Post by: Ian Price on 2008-Oct-18
MusicVolume was used in my B'lox! game so it definitely works with certain music formats (on GP2X and pc). Perhaps it's just MIDI that has a problem?
Title: Re: musicvolume
Post by: Hemlos on 2008-Oct-23
well i seem to have a bug somewhere, i figgured out that the midi volume on desktop is being turned down to 0 randomly every once in a while. and none of my settings in the program have musicvolume 0
only musicvolume 1.
Title: Re: musicvolume
Post by: MrTAToad on 2008-Oct-26
I'm having a problem whilst a WAV file is playing - using MUSICVOLUME doesn't seem to do much.
Title: Re: musicvolume
Post by: Ian Price on 2008-Oct-27
Erm, isn't that because .WAV is for generally considered for sounds, not music?

.WAV sound volume is controlled by PlaySound(Num, Pan, Volume).

I think PlayMusic is for .ogg, .MP3 et.c. Maybe you are using it for .WAV as well, which may be causing the problems. I dunno, I never use .WAV with PlayMusic.
Title: Re: musicvolume
Post by: Hemlos on 2008-Oct-27
Ian is correct; use this command library for *.wav format:

LOADSOUND
PLAYSOUND
SOUNDPLAYING
HUSH
Title: Re: musicvolume
Post by: MrTAToad on 2008-Oct-28
Unfortunately PLAYMUSIC always repeats the music, hence the reason I want to use PLAYSOUND.  Would still be nice if the volume could be changed whilst playing.
Title: Re: musicvolume
Post by: Hemlos on 2008-Oct-28
Ahh i see what you mean, good idea.

:good:


Post the PLAYVOL() PLAYPAN() idea

Personally, i would like to see all the sounds and controls for them merged, hence playsound and playmusic
Title: Re: musicvolume
Post by: Ian Price on 2008-Oct-28
Yes - perhaps adding an extra parameter to the PlayMusic command would be an idea
Code (glbasic) Select
PlayMusic "XXXX.MP3",1

- 0 for non looping or 1 for looping?
Title: Re: musicvolume
Post by: Hemlos on 2008-Oct-29
I built an MCI_Library for all multimedia...

http://www.glbasic.com/forum/index.php?topic=2502.msg18821#new

You can play midi once...

And it plays movies in fullscreen mode...

It plays wav files too, but i dont know if the MCI_Volume will work with it(it might)

WIN32 only (I think)
check sample zip's
Title: Re: musicvolume
Post by: momosxp on 2009-May-25
MUSICVOLUME still doesn't work with midi files. Is there any way to regulate the volume with midifiles?
Title: Re: musicvolume
Post by: Hemlos on 2009-May-27
Please post an example of your volume code.

If im not mistaking it is a range of 0 to 1 (0.0 - 1.0), so you have to float it in a decimal?

You can also try this inline setup for midi...it has a volume control, but i think you need to activate the midi in the same fashion with this set of code:

http://www.glbasic.com/forum/index.php?action=dlattach;topic=2502.0;attach=402