History log of /haiku/src/add-ons/media/media-add-ons/mixer/MixerInput.h
Revision Date Author Comments
# 425ac1b6 20-Jun-2023 Alexander von Gluck IV <kallisti5@unixzen.com>

refactor: Swap %Ld for %lld in all format usages

* %Ld is an undocumented alias for %lld in glibc.
* muslc doesn't implement it for this reason.
* While we will likely never drop %Ld support,
lets clean house and set a better example.

Change-Id: Id46dad3104abae483e80cc5c05d1464d3ecd8030
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6636
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# b006bbe1 01-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

* Resolved TODO and implemented updating resampling implementation on the fly.
* Reordered some methods in the source to align with declaration order.
* Applied naming conventions for private methods.
* Switched asterix style in MixerInput.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38488 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a79b30c3 31-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

* In the MixerInput, also use the Linear resampler if requested by the
settings. (There is a common "mixing frame rate" to which all inputs
resample, before the MixerCore resamples to the frame rate of the
output.)
* Some more coding style fixes in MixerCore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38479 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a6e0f877 30-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

Print the debug output only for the first channel,
more channels don't add more information.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38447 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c21a83bb 30-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

A few more coding style fixes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38442 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0960b6d0 30-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

Fixed more coding style errors.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38441 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a9cf57cf 02-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleanup, no functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34437 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bf7ab50d 03-Oct-2007 Stephan Aßmus <superstippi@gmx.de>

large patch by Bek (HOST team):
* style improvements, header reformatting, small refactoring and adding
of missing copyrights

(to Marcus: this is not the original patch, it has already been revised two
times by myself and I thought it was very nice now)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22426 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f916862c 13-Mar-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

Switched to using a local debug header file, instead of using the private media kit file.
This should prevent mixer from beeing build with debug enabled, when media kit is build with debug.
Thus CPU usage will be reduced as mixer no longer prints a lot of information to stdout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16759 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ca16f5cb 17-Oct-2003 beveloper <beveloper@nowhere.fake>

start of media kit codec plugin API


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5078 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e92593f4 09-Sep-2003 beveloper <beveloper@nowhere.fake>

implemented glitch correction, but it doesn' work very well after a longer time


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4608 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a4a83783 08-Sep-2003 beveloper <beveloper@nowhere.fake>

disabled debug code


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4569 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f91503b9 07-Sep-2003 beveloper <beveloper@nowhere.fake>

added a debbuging outputs, start threads always at high priority


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4539 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d91580cd 30-Aug-2003 beveloper <beveloper@nowhere.fake>

removed/fixed warnings


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4418 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4224efc3 16-Aug-2003 beveloper <beveloper@nowhere.fake>

implemeted non linear gain controls (similar to BeOS R5)
allow to select gain control slider modus in setup
(either controls physical input, or virtual output channels)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4288 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 69517c15 03-Jul-2003 beveloper <beveloper@nowhere.fake>

Removed gain controls from input channel mapping group.
Gain for each virtual mixer channel is now controlled in the main control group.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3820 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9c3be6a5 03-Jul-2003 beveloper <beveloper@nowhere.fake>

Fixed some debug macros.
Cleanup of MixerInput class.
Implemented output destination mapping controls.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3819 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c237c18 30-Jun-2003 beveloper <beveloper@nowhere.fake>

implemented mute support for input channel, fixed casting bugs


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3777 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9391f0a5 30-Jun-2003 beveloper <beveloper@nowhere.fake>

added mixer gain controls


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3775 a95241bf-73f2-0310-859d-f6bbb57e9c96


# af8d0a4d 30-Jun-2003 beveloper <beveloper@nowhere.fake>

Fixed the input buffer looping bug that existed if an input wouldn't receive new buffers. Now kips inputs that have no available data.
When no input is connected, use a fast path for sending an empty buffer.
No more debugging output when DEUBG < 1


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3763 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fae6ce82 29-Jun-2003 beveloper <beveloper@nowhere.fake>

added output channel control functions,
made most often called functions inline


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3746 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7619f562 29-Jun-2003 beveloper <beveloper@nowhere.fake>

fixed the debug output, added a workaround for missing samples if the
mixer framerate is not an integral multiple of the input framerate


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3734 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 356855c3 28-Jun-2003 beveloper <beveloper@nowhere.fake>

ugly workaround, create a new pool for each input mix buffer,
to avoid running out of default pool memory. It would be much
better if a pool would grow if more memory is requested than
available.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3729 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8d28117f 28-Jun-2003 beveloper <beveloper@nowhere.fake>

multiple bugfixes, but still many pops in output audio stream


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3725 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8df36cdd 25-Jun-2003 beveloper <beveloper@nowhere.fake>

Added experimental copying of the left channel from either input 1 or 0,
there seem to be some resampling related bugs


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3667 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 16cecbde 25-Jun-2003 beveloper <beveloper@nowhere.fake>

some workarounds, fMixStartTime is now always 0,
delay mix thread if timesource has negative time,
calculate correct time and frame base for mix thread


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3663 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7b0daf5c 24-Jun-2003 beveloper <beveloper@nowhere.fake>

allocate mixer buffers of the correct size,
place incoming data in input specific mix buffer


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3646 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 88777023 20-Jun-2003 beveloper <beveloper@nowhere.fake>

support endian adjustment,
other small changes


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3590 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a4b8db85 20-Jun-2003 beveloper <beveloper@nowhere.fake>

identify mixer channels by a type number (0 to 31)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3587 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2e9d6607 20-Jun-2003 beveloper <beveloper@nowhere.fake>

mixer input buffer assignment and gain setting implemented


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3585 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e6c7c99f 19-Jun-2003 beveloper <beveloper@nowhere.fake>

added connecting/disconnecting of inputs/outputs
changed debug functions
added multiaudio format correction
added workaround for broken BeOS R5 media_format:SpecializeTo()
fixed AudioMixer::Connect function to use correct destination
added utility functions
fixed locking bugs


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3575 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7ee2c804 15-Jun-2003 beveloper <beveloper@nowhere.fake>

Internal API rewritten, BMediaNode and derived classes functionality implemented.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3525 a95241bf-73f2-0310-859d-f6bbb57e9c96


# be2a2489 11-Jun-2003 beveloper <beveloper@nowhere.fake>

Mixer rewrite, work in progress.
Moved Input and Output handling into the MixerCore class,
format and connection negotiation remains in AudioMixer class.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3481 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 678c2017 06-Jun-2003 beveloper <beveloper@nowhere.fake>

added new mixer components


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3446 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b006bbe1304984932aa2bb114a332a63c2c3cc03 01-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

* Resolved TODO and implemented updating resampling implementation on the fly.
* Reordered some methods in the source to align with declaration order.
* Applied naming conventions for private methods.
* Switched asterix style in MixerInput.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38488 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a79b30c3b65a0035ccda843c6685accec08f833f 31-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

* In the MixerInput, also use the Linear resampler if requested by the
settings. (There is a common "mixing frame rate" to which all inputs
resample, before the MixerCore resamples to the frame rate of the
output.)
* Some more coding style fixes in MixerCore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38479 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a6e0f877c3f7e5e6fb611e1e9eabb490871c6ff8 30-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

Print the debug output only for the first channel,
more channels don't add more information.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38447 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c21a83bb4624220483c2831f3604efb8dd353d91 30-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

A few more coding style fixes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38442 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0960b6d0f15705757c0e7143e8645ad16f5f01a4 30-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

Fixed more coding style errors.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38441 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a9cf57cff5dfe040f74a96705d98d6711b6b1b50 02-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleanup, no functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34437 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bf7ab50d4ced3f1735551c8f6d9032a42e548f7e 03-Oct-2007 Stephan Aßmus <superstippi@gmx.de>

large patch by Bek (HOST team):
* style improvements, header reformatting, small refactoring and adding
of missing copyrights

(to Marcus: this is not the original patch, it has already been revised two
times by myself and I thought it was very nice now)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22426 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f916862c2ebbbf3a1fdeac1541fc75ded977bccf 13-Mar-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

Switched to using a local debug header file, instead of using the private media kit file.
This should prevent mixer from beeing build with debug enabled, when media kit is build with debug.
Thus CPU usage will be reduced as mixer no longer prints a lot of information to stdout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16759 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ca16f5cb038771bbe355c20cf55fb2f56138a402 17-Oct-2003 beveloper <beveloper@nowhere.fake>

start of media kit codec plugin API


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5078 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e92593f46aca8652d1d24decb9d7b9ac4fa83aa7 09-Sep-2003 beveloper <beveloper@nowhere.fake>

implemented glitch correction, but it doesn' work very well after a longer time


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4608 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a4a837837073d2a3364b92520b9a8f8f2360fcbb 08-Sep-2003 beveloper <beveloper@nowhere.fake>

disabled debug code


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4569 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f91503b9d9106a94a75f9430a961bd0a2c07c7be 07-Sep-2003 beveloper <beveloper@nowhere.fake>

added a debbuging outputs, start threads always at high priority


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4539 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d91580cd9a9f39e74f086d5ca31d997a56c111a9 30-Aug-2003 beveloper <beveloper@nowhere.fake>

removed/fixed warnings


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4418 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4224efc3c723b348c02b0bd4b6b75497f6624dbd 16-Aug-2003 beveloper <beveloper@nowhere.fake>

implemeted non linear gain controls (similar to BeOS R5)
allow to select gain control slider modus in setup
(either controls physical input, or virtual output channels)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4288 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 69517c1537473b9ae5a17672bed91790966dc583 03-Jul-2003 beveloper <beveloper@nowhere.fake>

Removed gain controls from input channel mapping group.
Gain for each virtual mixer channel is now controlled in the main control group.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3820 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9c3be6a55723d8024dc868f2e7119496f26295c5 03-Jul-2003 beveloper <beveloper@nowhere.fake>

Fixed some debug macros.
Cleanup of MixerInput class.
Implemented output destination mapping controls.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3819 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c237c1852883cd806f6b7f712f8d76c430d83ba 30-Jun-2003 beveloper <beveloper@nowhere.fake>

implemented mute support for input channel, fixed casting bugs


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3777 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9391f0a5526a6a1efb50e7ca73f1d07ac1c93ee2 30-Jun-2003 beveloper <beveloper@nowhere.fake>

added mixer gain controls


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3775 a95241bf-73f2-0310-859d-f6bbb57e9c96


# af8d0a4d4e15c210c51678cd34de4057e43cf96e 30-Jun-2003 beveloper <beveloper@nowhere.fake>

Fixed the input buffer looping bug that existed if an input wouldn't receive new buffers. Now kips inputs that have no available data.
When no input is connected, use a fast path for sending an empty buffer.
No more debugging output when DEUBG < 1


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3763 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fae6ce82e324e852c65c0d791056e749994bbfd6 29-Jun-2003 beveloper <beveloper@nowhere.fake>

added output channel control functions,
made most often called functions inline


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3746 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7619f562d51fda81dcc13a39f512f1976f63bbfc 29-Jun-2003 beveloper <beveloper@nowhere.fake>

fixed the debug output, added a workaround for missing samples if the
mixer framerate is not an integral multiple of the input framerate


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3734 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 356855c3f69d3e41c322e20961573cad3246bc10 28-Jun-2003 beveloper <beveloper@nowhere.fake>

ugly workaround, create a new pool for each input mix buffer,
to avoid running out of default pool memory. It would be much
better if a pool would grow if more memory is requested than
available.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3729 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8d28117ff7c15fa966ab55e20e5e343d89186097 28-Jun-2003 beveloper <beveloper@nowhere.fake>

multiple bugfixes, but still many pops in output audio stream


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3725 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8df36cdd65a951ddd995877cbe404efe366bb632 25-Jun-2003 beveloper <beveloper@nowhere.fake>

Added experimental copying of the left channel from either input 1 or 0,
there seem to be some resampling related bugs


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3667 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 16cecbde360eb5fc03598dc7d05fb2d9be9b6931 25-Jun-2003 beveloper <beveloper@nowhere.fake>

some workarounds, fMixStartTime is now always 0,
delay mix thread if timesource has negative time,
calculate correct time and frame base for mix thread


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3663 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7b0daf5ccadfdb073a738f291a2f4a74b29c46f0 24-Jun-2003 beveloper <beveloper@nowhere.fake>

allocate mixer buffers of the correct size,
place incoming data in input specific mix buffer


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3646 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 88777023cd6b39e9136e2b01b080c8456c677cf5 20-Jun-2003 beveloper <beveloper@nowhere.fake>

support endian adjustment,
other small changes


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3590 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a4b8db85300e877ad70fa2c13110eb8e0ab173a5 20-Jun-2003 beveloper <beveloper@nowhere.fake>

identify mixer channels by a type number (0 to 31)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3587 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2e9d660756e64ccd9bd2b779020a167b8c7a5824 20-Jun-2003 beveloper <beveloper@nowhere.fake>

mixer input buffer assignment and gain setting implemented


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3585 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e6c7c99fc916e8a498ef51a4940838d9f864df6c 19-Jun-2003 beveloper <beveloper@nowhere.fake>

added connecting/disconnecting of inputs/outputs
changed debug functions
added multiaudio format correction
added workaround for broken BeOS R5 media_format:SpecializeTo()
fixed AudioMixer::Connect function to use correct destination
added utility functions
fixed locking bugs


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3575 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7ee2c8049caebce89fd72e544a5db9f94cc6613f 15-Jun-2003 beveloper <beveloper@nowhere.fake>

Internal API rewritten, BMediaNode and derived classes functionality implemented.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3525 a95241bf-73f2-0310-859d-f6bbb57e9c96


# be2a24894fa4b3e2578b1d1994d33bbb2b935216 11-Jun-2003 beveloper <beveloper@nowhere.fake>

Mixer rewrite, work in progress.
Moved Input and Output handling into the MixerCore class,
format and connection negotiation remains in AudioMixer class.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3481 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 678c20170c8b023b7d2e297b3ac436dbdea61e52 06-Jun-2003 beveloper <beveloper@nowhere.fake>

added new mixer components


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3446 a95241bf-73f2-0310-859d-f6bbb57e9c96