-3
android에서 ogg 파일을 재생하고 싶습니다. 인터넷에서이 필드에 대한 유용한 문서를 찾을 수 없습니다. 어떻게해야합니까?안드로이드에서 ogg 파일을 프로그래밍 방식으로 재생
android에서 ogg 파일을 재생하고 싶습니다. 인터넷에서이 필드에 대한 유용한 문서를 찾을 수 없습니다. 어떻게해야합니까?안드로이드에서 ogg 파일을 프로그래밍 방식으로 재생
public void playSound()
{
AudioManager meng = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE);
int volume = meng.getStreamVolume(AudioManager.STREAM_NOTIFICATION);
if (volume != 0)
{
if (_shootMP == null)
_shootMP = MediaPlayer.create(getContext(), Uri.parse("file:///system/media/audio/ui/camera_click.ogg"));
if (_shootMP != null)
_shootMP.start();
}
}