S Smee Well-Known Member Licensed User Longtime User Feb 14, 2012 #1 Can someone advise what is wrong with this code B4X: This does not work p.SetVolume(p.VOLUME_MUSIC,p.GetMaxVolume,False) but this does p.SetVolume(3,15,False) Compiling code. Error Error compiling program. Error description: Cannot cast: {Type=Boolean,Rank=0} to number. Occurred on line: 1064 p.SetVolume(p.VOLUME_MUSIC,p.GetMaxVolume,False) Word: false Click to expand...
Can someone advise what is wrong with this code B4X: This does not work p.SetVolume(p.VOLUME_MUSIC,p.GetMaxVolume,False) but this does p.SetVolume(3,15,False) Compiling code. Error Error compiling program. Error description: Cannot cast: {Type=Boolean,Rank=0} to number. Occurred on line: 1064 p.SetVolume(p.VOLUME_MUSIC,p.GetMaxVolume,False) Word: false Click to expand...
stevel05 Expert Licensed User Longtime User Feb 14, 2012 #2 GetMaxVolume requires a Channel parameter. B4X: p.SetVolume(p.VOLUME_MUSIC,p.GetMaxVolume(p.VOLUME_MUSIC),False) Upvote 0
GetMaxVolume requires a Channel parameter. B4X: p.SetVolume(p.VOLUME_MUSIC,p.GetMaxVolume(p.VOLUME_MUSIC),False)
S Smee Well-Known Member Licensed User Longtime User Feb 14, 2012 #3 stevel05 said: GetMaxVolume requires a Channel parameter. B4X: p.SetVolume(p.VOLUME_MUSIC,p.GetMaxVolume(p.VOLUME_MUSIC),False) Click to expand... :sign0013: I was just about to post i realised my mistake. Thankyou for the correction. However it does not opver-ride the device volume control (TTS). Which is what i need to do. Is this possible? or am i missing something? Thanks Joe Upvote 0
stevel05 said: GetMaxVolume requires a Channel parameter. B4X: p.SetVolume(p.VOLUME_MUSIC,p.GetMaxVolume(p.VOLUME_MUSIC),False) Click to expand... :sign0013: I was just about to post i realised my mistake. Thankyou for the correction. However it does not opver-ride the device volume control (TTS). Which is what i need to do. Is this possible? or am i missing something? Thanks Joe
stevel05 Expert Licensed User Longtime User Feb 14, 2012 #4 Have you seen this? It may help. Steve Upvote 0
S Smee Well-Known Member Licensed User Longtime User Feb 14, 2012 #5 thanks Steve I had seen that but i did not really want to add another library to a fast becoming bloated project if there was another way Joe Upvote 0
thanks Steve I had seen that but i did not really want to add another library to a fast becoming bloated project if there was another way Joe