android - How to play media file -


i using following code play audio file. have tested audio file on android phone player & playing quite loud. when trying play same audio file following code , feeble. there problem code ? can increase volume of media file changing value ?

while testing , volume of android device has been put maximum value.

kindly provide inputs/sample code. in advance.

public void playalertsound() {          mediaplayer player = mediaplayer.create(this, r.raw.beep);         player.setlooping(false); // set looping         player.setvolume(0.90f, 0.90f);         // begin playing selected media         player.start();         // release media instance system         player.release();      } 

try player.setvolume(1.0f, 1.0f); instead; or leave off line entirely. can try scaling value past 1.0, although that's not recommended.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -