wiki:SCENE_AUDIO_POINT_R0
Last modified 16 years ago Last modified on 12/15/08 16:15:49

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=SCENE_AUDIO_POINT_R0, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block

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.

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

trunk/sophie2-platform/modules/org.sophie2.main.media.fobs/src/test/java/org/sophie2/main/media/fobs/TestAudioVideo.java?rev=704

Comments

Log

Analysis: Pap - done(15m)
Design:
Implementation:
Testing:
Comments: