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

Ticket Summary Owner Status Type Component Priority Effort Importance
#268 SCENE_AUDIO_POINT_R0 Tanya closed planned_task BASE_SCENE 3 0.5 20

Reported by Astea, 4 years ago.

Description

wiki page: SCENE_AUDIO_POINT_R0 - effort: 0.5d

Analysis_owners

pap

Analysis_reviewers

pav

Analysis_score

3

Design_owners

alex

Design_reviewers

tanya

Design_score

3

Imp._owners

alex

Imp._reviewers

pap

Imp._score

3.5

Test_score

0

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: