10

Click here to load reader

제 5회 DGMIT R&D 컨퍼런스: Sound Module With OperSLEs

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

Page 1: 제 5회 DGMIT R&D 컨퍼런스: Sound Module With OperSLEs

Sound Module with OpenSL ES

2014. 11. 24

Version : 1.0.0

made by 최대우 R&D

Page 2: 제 5회 DGMIT R&D 컨퍼런스: Sound Module With OperSLEs

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

Page 3: 제 5회 DGMIT R&D 컨퍼런스: Sound Module With OperSLEs

3

1. OpenSL ES란 ? 알고 보자 OpenSL ES !

Audio File 재생 및 녹음 기능

Audio Effect 기능

MIDI (Musical Instrument Digital Interface) 파일 재생 기능

Page 4: 제 5회 DGMIT R&D 컨퍼런스: Sound Module With OperSLEs

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

Page 5: 제 5회 DGMIT R&D 컨퍼런스: Sound Module With OperSLEs

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

Page 6: 제 5회 DGMIT R&D 컨퍼런스: Sound Module With OperSLEs

6

3. Sound Player Android Activity

Audio Engine and Buffuer be loaded when App create

Use Spinner for Select Audio File

Page 7: 제 5회 DGMIT R&D 컨퍼런스: Sound Module With OperSLEs

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.

Page 8: 제 5회 DGMIT R&D 컨퍼런스: Sound Module With OperSLEs

8

4. Sound Player Layout

Page 9: 제 5회 DGMIT R&D 컨퍼런스: Sound Module With OperSLEs

9

5. Run on Android SmartPhone

Page 10: 제 5회 DGMIT R&D 컨퍼런스: Sound Module With OperSLEs

10