Ticket #2155 (closed bug)
Implement JavaSound alternative for audio_input and audio_output
Reported by: | milo | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | X2 |
Component: | uncategorized | Version: | 2.0 |
Keywords: | Cc: | ||
Category: | unknown | Effort: | |
Importance: | Ticket_group: | ||
Estimated Number of Hours: | 0 | Add Hours to Ticket: | 0 |
Billable?: | yes | Total Hours: | 0 |
Analysis_owners: | Design_owners: | milo | |
Imp._owners: | milo | Test_owners: | |
Analysis_reviewers: | Changelog: | ||
Design_reviewers: | pap | Imp._reviewers: | pap |
Test_reviewers: | Analysis_score: | 0 | |
Design_score: | 4 | Imp._score: | 3.5 |
Test_score: | 0 |
Description
Because several problems exist with the natives audio_input and audio_output, and also because they make the packaging and building harder, I propose the following to be implemented:
- Add an alternative to the NativeOutputBridge using the Java Sound System.
- Make it the default, although it should be configurable via system property.
- If there is a problem opening the audio (like no available sound card) the system should fall back to DummyOutputBridge.
- Do the same for the audio input.
Advantages:
- Fewer native processes, less probability of system specific bugs.
- Still possible to use the native processes.
Disadvantages:
- On linux uses OSS. Should be launched through a wrapper such as "aoss". Not sure how this can be achieved from an applet.
Change History
comment:2 Changed 15 years ago by milo
- Status changed from s1b_analysis_finished to s2a_design_started
comment:3 Changed 15 years ago by milo
- Status changed from s2a_design_started to s2b_design_finished
The implementation is in branches/private/milo/jsound/sophie2-platform.
Notes:
- Moved some constants and wave utils to branches/private/milo/jsound/sophie2-platform/modules/org.sophie2.main.media.natlib/src/main/java/org/sophie2/main/media/natlib/SoundUtils.java
- Added input implementation in branches/private/milo/jsound/sophie2-platform/modules/org.sophie2.main.media.natlib/src/main/java/org/sophie2/main/media/natlib/input/JavaSoundInputBridge.java
- Changed branches/private/milo/jsound/sophie2-platform/modules/org.sophie2.main.media.natlib/src/main/java/org/sophie2/main/media/natlib/input/NativeAudioInput.java,
- It respects the system property "org.sophie2.main.media.useNativeInput" (by default false)
- Runs either the java-sound or the native implementation.
- Added output implementation branches/private/milo/jsound/sophie2-platform/modules/org.sophie2.main.media.natlib/src/main/java/org/sophie2/main/media/natlib/output/JavaSoundOutputBridge.java
- Changed branches/private/milo/jsound/sophie2-platform/modules/org.sophie2.main.media.natlib/src/main/java/org/sophie2/main/media/natlib/output/NativeAudioOutput.java
- To respect the system property "org.sophie2.main.media.useNativeOutput" (by default false);
- Runs either the java-sound or the native implementation.
- Still falls back to dummy on error.
comment:4 Changed 15 years ago by pap
- Design_owners set to milo
- Status changed from s2b_design_finished to s3c_implementation_ok
- Imp._owners set to milo
- Imp._reviewers set to pap
- Design_score changed from 0 to 4
- Design_reviewers set to pap
- Imp._score changed from 0 to 3.5
- It is great the we have this way to be a bit less native-dependent.
- Unfortunately this implementation gives some kind of problems on some machines and in these caases it is worse that with native as we have no timelines at all, no just sound
- The JavaDoc was not according to our "convention" :(
- Commited in [8118]
Note: See
TracTickets for help on using
tickets.