Click here to load reader
Upload
dgmit2009
View
83
Download
3
Embed Size (px)
DESCRIPTION
1.OpenSL ES란? 2.sound player Native Method 3.Sound player Android Activity 4.Sound Player Layout 5.Run on Android SmartPhone
Citation preview
Sound Module with OpenSL ES
2014. 11. 24
Version : 1.0.0
made by 최대우 R&D
2
CONTENTS.
1. OpenSL ES란? …………………………………….. 3
2. Sound Player Native Method .……………………. 4
a) createEngine …….………………………. 4
b) createBufferQueueAudioPlayer ……...... 4
c) createAssetAudioPlayer ……….……….. 5
d) setPlayingAssetAudioPlayer ….………... 5
e) shutdown ……………………………………… 5
3. Sound Player Android Activity .……………………. 6
4. Sound Player Layout ……………....…….………… 8
5. Run on Android SmartPhone ..…………………….. 9
3
1. OpenSL ES란 ? 알고 보자 OpenSL ES !
Audio File 재생 및 녹음 기능
Audio Effect 기능
MIDI (Musical Instrument Digital Interface) 파일 재생 기능
4
2. Sound Player Native Method
a) void createEngine(JNIEnv*, jclass) - create engine - realize the engine - get the engine interface, which is needed in order to create other objects - create output mix, with environmental reverb specified as a non-required interface - realize the output mix
b) void createBufferQueueAudioPlayer(JNIEnv*, jclass) - configure audio source
- configure audio sink - create audio player - realize the player - get the play interface - get the buffer queue interface - register callback on the buffer queue - get the effect send interface - get the volume interface - set the player's state to playing
5
2.
c) jboolean createAssetAudioPlayer(JNIEnv*, jclass, jobject, jstring, filename) - use asset manager to open asset by filename - open asset as file descriptor - create audio player - realize the output mix, realize the player - get the play, seek, mute, volume interface - enable whole file looping
d) void setPlayingAssetAudioPlayer(JNIEnv*, jclass, jboolean) - set play mode
e) shutdown() - destroy all of audio player object, and invalidate all associated interfaces
Sound Player Native Method
6
3. Sound Player Android Activity
Audio Engine and Buffuer be loaded when App create
Use Spinner for Select Audio File
7
3. Sound Player Android Activity
Triggered onClick Event when playing state and Selected
Different File, shutdown all of audio player and
Create new Audio Engine and Buffer.
Toggle player state.
8
4. Sound Player Layout
9
5. Run on Android SmartPhone
10