Analysis
Overview
The audio extension point of a scene is the one responsible for the playing of audio.
Task requirements
- Define the way audio content is connected to the scene.
- Adapt existing audio functionallity to the model.
Task result
The result of this task should be source code.
Implementation idea
- The audio may be represented as a stream that should be played by the concrete implementors.
Related
How to demo
- Describe how the scene will interact with audio content.
Design
- Create org.sophie2.main.media.fobs module
- Create interface AudioEngine which is used for audio content management. It has the following methods :
- boolean play(AudioHandler audio)
- boolean stop(AudioHandler audio)
- boolean seek(AudioHandler audio, Time time)
- boolean registerHandler(AudioHandler audio)
- boolean unregisterHandler(AudioHandler audio)
- Time getDuration(AudioHandler audio)
- Time getPosition(AudioHandler audio)
- boolean isPlaying(AudioHandler audio)
- Create class JMFAudioEngine which implements AudioEngine interface (the extension point interface) and provides implementation for all its methods. The idea is that it registers AudioHandlers and keep them mapped with their respective JMF Players and it plays the audio files associated with the AudioHandlers (through URLs);
- Create interface AudioHandler which has only one method URL getSource();
- Create class JMFAudioHandler which implements AudioHandler and has one property source of type URL which stores the URL to an audio file and has get/set methods.
- The demo test org.sophie2.main.media.fobs.TestAudioVideo.java tests creating AudioHandler, AudioEngine, registering/unregistring the AudioHandler with the AudioEngine, and the play and stop methods.
Implementation
trunk/sophie2-platform/modules/org.sophie2.main.media.fobs/src/main/java/org/sophie2/main/media/fobs/AudioEngine.java?rev=748
trunk/sophie2-platform/modules/org.sophie2.main.media.fobs/src/main/java/org/sophie2/main/media/fobs/AudioHandler.java?rev=748
trunk/sophie2-platform/modules/org.sophie2.main.media.fobs/src/main/java/org/sophie2/main/media/fobs/JMFAudioEngine.java?rev=746
trunk/sophie2-platform/modules/org.sophie2.main.media.fobs/src/main/java/org/sophie2/main/media/fobs/JMFAudioHandler.java?rev=704
Testing
Comments
Log
Analysis: Pap - done(15m)
Design:
Implementation:
Testing:
Comments: