Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Help needed with FMOD library

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-02-2010, 07:22 PM
Newbie
 
Join Date: Feb 2010
Posts: 5
Default Help needed with FMOD library

Hello,

I need to set the master volume of the loud speaker. I tried the FMOD library, all seems to work fine except the master volume.
I tried with the following code :


Sub App_Start
Form1.Show
fmod.New1
End Sub

Sub Button1_Click
fmod.Play(AppPath & "\chord.wav")
End Sub

Sub Button2_Click
fmod.Volume = 0
End Sub

Sub Button3_Click
fmod.Volume = 100
End Sub

Sub Button4_Click
Msgbox( "Volume = " & fmod.Volume )
End Sub


When I use button2 or button3, further using Button4 gives the right value but Button1 doesn't care of it.

Cand someone help me ?

Thanx
__________________
Onofrio
Reply With Quote
  #2 (permalink)  
Old 03-02-2010, 09:28 PM
Basic4ppc Expert
 
Join Date: May 2008
Location: Berkshire, UK
Posts: 810
Awards Showcase
Beta Tester 
Total Awards: 1
Default

My code (http://www.basic4ppc.com/forum/share...html#post30578) sets the volume each time a file starts to play.

I don't think that fmod.dll undertakes to remember any settings between playing files.

You just need to remember what volume setting you want in a global variable...

Mike.
Reply With Quote
  #3 (permalink)  
Old 03-08-2010, 09:57 AM
Newbie
 
Join Date: Feb 2010
Posts: 5
Default

Quote:
Originally Posted by mjcoon View Post
My code (http://www.basic4ppc.com/forum/share...html#post30578) sets the volume each time a file starts to play.

I don't think that fmod.dll undertakes to remember any settings between playing files.

You just need to remember what volume setting you want in a global variable...

Mike.
Hello,
Thanx for your answer.
Do you mean that the volume is automaticaly reset to the max each time a sound is played so I have to set it to the right volume after the play() method is invoked ?

Like this :

Sub Button1_Click
fmod.New1
fmod.Play(AppPath & "\chord.wav")
fmod.Volume = 100
End Sub


Thanx
__________________
Onofrio
Reply With Quote
  #4 (permalink)  
Old 03-08-2010, 10:15 AM
Basic4ppc Expert
 
Join Date: May 2008
Location: Berkshire, UK
Posts: 810
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by grrnfr View Post
... I have to set it to the right volume after the play() method is invoked ?
Yes, I think that is exactly what you have proved that you have to do (and is how my program does it).

(My program allows the user to choose the volume and stores the value in a global variable. Then that variable is used to set the volume for each file playing. But of course a different file might itself be louder or quieter in which case the user might want to adjust again!)

Mike.
Reply With Quote
  #5 (permalink)  
Old 03-11-2010, 08:54 PM
Newbie
 
Join Date: Feb 2010
Posts: 5
Default

Quote:
Originally Posted by mjcoon View Post
Yes, I think that is exactly what you have proved that you have to do (and is how my program does it).

(My program allows the user to choose the volume and stores the value in a global variable. Then that variable is used to set the volume for each file playing. But of course a different file might itself be louder or quieter in which case the user might want to adjust again!)

Mike.
Hello,
Thanx for your answer.
I have try this method and it works but not the way I expected...
With this method, volume can be set between 0 and 255. 255 is the volume of the PDA that must be set manualy.
I would like to set the PDA master volume and not the volume of the played sound.
I want to set the PDA volume to 0 and set it to the max only when needed (alarms) because when it is set to the max, it generates noise in the phone speaker.
Do you think that there is a solution to my problem ?

Best regards
__________________
Onofrio
Reply With Quote
  #6 (permalink)  
Old 03-11-2010, 09:28 PM
Basic4ppc Expert
 
Join Date: May 2008
Location: Berkshire, UK
Posts: 810
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by grrnfr View Post
I would like to set the PDA master volume and not the volume of the played sound.
I want to set the PDA volume to 0 and set it to the max only when needed (alarms) because when it is set to the max, it generates noise in the phone speaker.
Do you think that there is a solution to my problem ?

Best regards
I don't know the answer to that. I suggest that you ask a separate question that is not under the heading of an FMOD topic. Maybe there's something in one of the several hardware-related libraries.

Mike.
Reply With Quote
  #7 (permalink)  
Old 03-14-2010, 06:03 PM
Newbie
 
Join Date: Feb 2010
Posts: 5
Default

Quote:
Originally Posted by mjcoon View Post
I don't know the answer to that. I suggest that you ask a separate question that is not under the heading of an FMOD topic. Maybe there's something in one of the several hardware-related libraries.

Mike.
Hello,
Thanx for your help.
You're right, I'm going to start another post.
__________________
Onofrio
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
FMOD library V1.5 Erel Official Updates 17 04-30-2010 10:57 AM
fmod cs0246 kindofmoment Questions (Windows Mobile) 1 01-18-2009 03:37 PM
FMOD library update Erel Official Updates 2 07-12-2008 03:07 PM
FMOD library and .Net CF 2.0 Erel Announcements 0 05-19-2007 08:02 PM
FMOD and the device sloopa Questions (Windows Mobile) 2 05-19-2007 07:40 PM


All times are GMT. The time now is 08:38 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0