On my dummy android app I try to replicate the functionality of an audio player. The files I have to deal with, are some ogg files which are not too long: 2-3 seconds.
The problem is that the volume of the files is too low. I'll like to augment the volume but I don't know how. In my app, the sounds are played on a volume equivalent to the one from phone call. I'll like to augment the volume, to the one from the voice call when I use the speaker mode.
AssetFileDescriptor afd;
try {
afd = getAssets().openFd(strPlayFileName);
mPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
mPlayer.prepare();
afd.close();
mPlayer.start();
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalStateException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
That is the code that plays my ogg files. Any feedback is welcome.