aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/openal/util
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1481: ALAudioSink: Adopt to GlueGen's PascalString ChangeSven Gothel2023-12-021-3/+3
|
* feat(devices): Move ALC_EXT constant from ALCconstants into ALHelpers with ↵Mathieu Féry2023-11-141-0/+3
| | | | other ALC_EXT names
* ALAudioSink: Use clipAudioVolume(..) function for claritySven Gothel2023-10-161-5/+9
|
* Bug 1472: Enhance AV Sync: Pass through PTS object in ALAudioSink, tracking ↵Sven Gothel2023-10-152-24/+19
| | | | | | last PTS value against System Clock Reference (SCR) See GlueGen commit 52725b4c6525487f93407f529dc0a758b387a4fc
* ALAudioSink: getPTS() returns time-adjusted last dequeued PTS, new ↵Sven Gothel2023-10-062-186/+216
| | | | | | | | | | updateQueue() dequeues w/o wait 1st, then returns adjusted PTS; Simplify/split waitFroReleaded*(); Use TSPrinter for DEBUG Returning the time-adjusted PTS from the last dequeued frame seems to be the most accurate value we can deliver. Hence we store the Clock.currentMillis() in playing_pts_t0 when updating playing_pts and add the difference to current Clock.currentMillis() when retrieving.
* Bug 1472: AVSync: Add more comprehensive DEBUG info to detect sync issuesSven Gothel2023-10-042-71/+139
|
* Bug 1473 - ALAudioSink: AV Synchronization Broken, Regression in-between ↵Sven Gothel2023-10-042-161/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | JogAmp Version [2.4.0 - 2.5.0] - Adopt to simplified AudioSink - Add lastBufferedPTS and expose it - Cleanup short* and perf*String() trace/debug presentations to simplify review - Hence drop growBuffers() - Set initial avgFrameDuration to latency, at least a good start +++ dequeueBuffer(..): - Pass releaseBufferCountReq directly, tangible only if wait == true, have enqueueData(..) determine the wait and releaseBufferCountReq value. - Drop dequeueBuffer(..) overload caller, simplifying code - Don't change playingPTS(..) in overload caller, enqueueData(..) takes care of it - Align DEBUG trace with enqueueData(..) to simplify review - Otherwise no semnatic change in dequeueBuffer(..) enqueueData(..): - Dropped growBuffers() - Show DEBUG trace before actual dequeueBuffer(..) to have meanigful output - SOFT (no-wait) dequeueBuffer(..) triggers on 2/3rd full queue - HARD (wait) dequeueBuffer(..) if queue is full - Set playingPTS, either use - old queue-tip (too old) and add (forward) 60% of queue-buffer time - new queue-tail (too young), subtract (delay) 40% of queue-buffer time
* SimpleSineSynth: Reuse WorkerThread, drop handcrafted code ..Sven Gothel2023-10-031-113/+30
| | | | | Actually new GlueGen WorkerThread was created from GLMediaPlayer, which was also the template for this one and hence lead to generalization to WorkerThread.
* ALAudioSink: Allow disabling using AL_SOFT_events via setUseSOFTEvents(boolean)Sven Gothel2023-10-031-4/+12
|
* SimpleSineSynth: Ensure stop() destroys ALAudioSink even if streamWorker is ↵Sven Gothel2023-10-031-0/+2
| | | | not running
* ALAudioSink.dequeueBuffer(..): AL_SOFT_events cumulated released buffers is ↵v2.5.0Sven Gothel2023-08-011-5/+20
| | | | 'sometimes wrong'. Workaround: Query released buffers after receiving event and use minimum.
* AL_SOFT_events: Define 'ALCcontext` as `UserParam` type for more claritySven Gothel2023-07-101-2/+2
|
* ALAudioSink.destroy(): Shutdown alEventCallbackSOFT properly (only if ↵Sven Gothel2023-07-091-7/+9
| | | | hasAL_SOFT_events, 1st disable all events); growBuffers(): No pre-condition exception for hasAL_SOFT_events
* ALAudioSink: Utilize AL_SOFT_events if available, i.e. use callback for ↵Sven Gothel2023-07-091-42/+97
| | | | | | | released buffer count instead of polling With wait == true, we simply wait until enough buffers have arrived, otherwise take what we got - both w/o polling and querying the alSource.
* Add OpenAL extension AL_SOFT_events using userParam ALCcontext as key for ↵Sven Gothel2023-07-091-0/+3
| | | | | | GlueGen JavaCallback https://openal-soft.org/openal-extensions/SOFT_events.txt
* Promote SimpleSineSynth to API (util) from Synth02AL, allowing user to have ↵Sven Gothel2023-05-231-0/+433
| | | | a simple sound source to test
* ALAudioSink: Use and expose Sound3D object, allow user app to deal w/ ↵Sven Gothel2023-05-231-453/+321
| | | | | | | | | | | JOAL/OpenAL easier and reuse Context context locking Context locking logic has been fixed and moved to Sound3D Context class (beside many other transparency changes), see commit afb386e13fd00fde1401d4551ee4790b1f6d5e09. This also aligns w/ AudioSink API change of Gluegen commits - c04726720a57f8db42f2621ad58ff3bd42006c63 - 6a74d16a805a4204093972bb91361b2aa633065c
* ALAudioSink: Use float in seconds for duration (AudioFormat and ↵Sven Gothel2023-05-211-81/+101
| | | | 'avgFrameDuration') to avoid losing precision when dealing with stats, averages etc
* ALAudioSink: Enhance description re 'AudioFrame' and 'frameDuration'; Drop ↵Sven Gothel2023-05-211-5/+10
| | | | unused field 'avgFrameDuration'.
* Fix ALAudioSink.dequeueBuffer(): AL_BUFFERS_PROCESSED result is total not ↵Sven Gothel2023-05-201-5/+14
| | | | | | | | | | | | | | | | | | accumulative while waiting (not yet dequeueing), ... Further: - brackets were missed in 'sleep =', i.e. 'releaseBufferLimes-releasedBuffers * avgBufferDura' -> '(releaseBufferLimes-releasedBuffers) * avgBufferDura)' - The minimum sleep of avgFrameDuration 'sleep = Math.max(avgFrameDuration, ..' lead to cut-off smaller sleep cycles and the else branch would only sleep for less (1ms) multiple times. Hence use the minimum of 2ms, where we subtract 1ms for busy polling. Notable, this is an extreme situation of small buffer sizes (duration), but may happen on like synthesizer applications (jsyn). We actually could use latency (refresh cycle) as used in OpenAL-Soft, but this is an undocumented feature .. sort of.
* ALHelpers.getALFormat(..): Drop alGetEnumValue("type") and use 'type' via ↵Sven Gothel2023-05-201-17/+18
| | | | | | | | | ALExtConstants directly: Fixes failing al.alGetEnumValue("AL_FORMAT_STEREO_DOUBLE") al.alGetEnumValue("AL_FORMAT_STEREO_DOUBLE") failed w/ OpenAL-Soft, despite having AL_EXT_MCFORMATS, AL_EXT_FLOAT32 and AL_EXT_DOUBLE supported. Notable, al.alGetEnumValue("AL_FORMAT_MONO_FLOAT32") did work.
* ALAudioSink.toString(): Allow null==chosenFormat (pre init string ↵Sven Gothel2023-05-201-1/+1
| | | | representation)
* ALAudioSink: Add getSourceCount() and cleanup error handling and initImpl() ↵Sven Gothel2023-05-201-237/+248
| | | | | | locking and exit. initImpl() shall just return false, not throwing an exception.
* ALAudioSink: Query latency and re-create context @ init w/ latency ↵Sven Gothel2023-05-191-137/+245
| | | | (refresh-rate) if frameDuration < defaultLatency
* ALAudioSink.lockContext(): Only check error state if AL ↵Sven Gothel2023-05-181-14/+29
| | | | makeContextCurrent()/alcSetThreadContext() fails (returns false)
* ALAudioSink: Don'e check errors before context; Track method of ↵Sven Gothel2023-05-181-4/+11
| | | | | | context-locking and release same way; Destroy shall also release context. Result is 'ALSOFT(WW)' free.
* ALAudioSink: Promote to public, be fully functional regarding AudioFormat ↵Sven Gothel2023-05-182-19/+1413
| | | | and OpenAL paremeter. Can be 'plugged' into existing OpenAL logic.
* ALAudioSink: Enhance using AL_EXT_MCFORMATS (max channels == 8), ↵Sven Gothel2023-05-171-6/+13
| | | | | | | | | | | AL_EXT_FLOAT32, AL_EXT_DOUBLE Note: AL_SOFT_buffer_samples is n/a since openal-soft 1.18.0 ALHelpers.getALFormat(..) uses cached booleans for optionally used available extensions. Add DEBUG output for ALAudioSink.init() and ALAudioSink.isSupported(), allowing to track supported and used formats.
* Fix Bug 1280: WAVData.loadFromStream(..) *API Change*: Only take expected ↵Sven Gothel2023-05-042-11/+7
| | | | | | | | | | byteCount (2nd arg) using IOUtil.copyStreamChunk2ByteBuffer(..) This fix is inspired by Bug 1280, <https://github.com/sgothel/joal/pull/16>, 'copy only needed bytes' for JOAL's com.jogamp.openal.util.WAVData.loadFromStream(..). This GlueGen IOUtil.copyStreamChunk2ByteBuffer() method is a revised version of the proposed IOHelpers.copyFromStream2ByteBuffer(..), see <https://github.com/OndrejSpanel/joal/commit/1616659e98904270af4faca25b770d0983609735>
* Ensure that only the size of sample data chunk is loaded, rather than entire ↵Matthew Harris2016-01-062-5/+10
| | | | remaining buffer. Copes with WAV files that have metadata appended to the end after the data RIFF chunk.
* WAVLoader: Adopt to GlueGen's Bitstream commit ↵Sven Gothel2015-01-281-11/+11
| | | | 9e13e8c78ed69bb7afcd49abe8bf69340dc06223
* Code Clean-Up based on our Recommended Settings (jogamp-scripting ↵Sven Gothel2014-07-034-65/+66
| | | | | | | | | | | | | c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) - Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
* WAVLoader: Use Bitstream and support big-endian RIFX; Fix ALutWAVLoaderTestSven Gothel2014-02-212-92/+81
|
* ALHelpers: Shorten returned string representationsSven Gothel2013-08-261-12/+12
|
* Add util class ALHelpers - Ported to Java from OpenAL-Soft from (c) 2011 ↵Sven Gothel2013-08-261-0/+376
| | | | | | | Chris Robinson (BSD'ish) - Renamed type conversion methods - Added generic type -> AL types
* Removes all references to javax.sound.* in order to allow JOAL to work in ↵Julien Gouesse2013-03-272-31/+94
| | | | non-J2SE environments
* WavData.loadFromStream: Uses IOUtil.copyStream2ByteBuffer which fixes ↵Sven Gothel2013-02-012-15/+19
| | | | | | | loading on Android; Adding proper byteOrder swapping depending on input format. - Also added a few more test streams - Working Android test activity
* Android Build & Test ; WavLoader/Data javax.audio separation (part-1)Sven Gothel2013-01-312-59/+98
|
* removed BufferUtils since we have now Buffers in gluegen-rt.Michael Bien2010-07-081-266/+0
|
* renamed package to com.jogamp.openal.*Michael Bien2010-03-294-0/+622