History log of /haiku/src/add-ons/media/media-add-ons/multi_audio/MultiAudioNode.cpp
Revision Date Author Comments
# 8d35d957 26-Feb-2024 Augustin Cavalier <waddlesplash@gmail.com>

MultiAudioNode: Actually take input_channel_count into account.

USB audio input now works properly (as it has only 1 channel,
not 2.)


# 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>


# 5433e7e2 09-Sep-2021 Augustin Cavalier <waddlesplash@gmail.com>

MultiAudioNode: Print a message when rejecting buffers.

This file just uses fprintf(stderr, ). Probably it should be
converted to use macros...

This allows for easy debugging of silence by restarting the media addon
server in a terminal. Eventually we should fix #17245.


# 223769c6 06-Sep-2021 Augustin Cavalier <waddlesplash@gmail.com>

multi_audio: Clean up formats reporting support.

* We are no longer on BeOS and can now use format_is_compatible
and format->SpecializeTo.
* Remove set-but-unused media_format in node_output.

This allows AudioAdapter to connect to MultiAudioNodes.
However, no sound is produced. I have yet to determine why.
In the meantime, this seems to at least not break audio.

Change-Id: I983a496556c52a4ccde0c2cd165c659d597b84c3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4432
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 1640b4de 06-Sep-2021 Augustin Cavalier <waddlesplash@gmail.com>

multi_audio: Style and dead code cleanup.

No functional changes intended.


# d92c60dc 03-Sep-2021 Augustin Cavalier <waddlesplash@gmail.com>

multi_audio: Rework validity checks in the constructor.

In hrev55048, checks were added to bail on initialization if invalid
audio formats were present either in inputs or outputs, which broke
any audio nodes that supported only one or the other. Now, instead,
we check channels first, and even then do not bail on invalid formats,
but simply do not declare support for inputs or outputs respectively.

This solves the initial cause of #17235. However, that ticket refers to
an unrelated problem this bug merely exposed, and so it should remain
open until that is resolved.


# a77684c9 16-Mar-2021 Adrien Destugues <adrien.destugues@opensource.viveris.fr>

MultiAudioNode: sanitize inputs

Change-Id: Ida5d74b88ec06daf738fd8b98c29737ed87c7cae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3491
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# c7c0cf72 29-Jul-2020 Michael Lotz <mmlr@mlotz.ch>

multi_audio: Replace old buffer infos with old cycle numbers.

The old buffer info was not initialized so would possibly contain bogus
initial content.

Since the introduction of the TimeComputer, the old buffer info was not
used to update the timesource data and the only remaining use was for
keeping track of the previous cycle number.

Replace the old buffer info by just the old cycle number and initialize
that.

Change-Id: I8be5a17f086a9f81f9b8fd0629e10460518f3d8c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3111
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# f3681883 14-Feb-2020 Jérôme Duval <jerome.duval@gmail.com>

Revert "hmulti_audio.media_addon: stop the output thread on BTimedEventQueue::B_STOP"

This reverts commit 571148258b901c87717395e3a91d9b078992359c.

Change-Id: I5efa34035ebe51fce2521684987bb6e8b7dc42d3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2246
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 57114825 21-Dec-2019 Jérôme Duval <jerome.duval@gmail.com>

hmulti_audio.media_addon: stop the output thread on BTimedEventQueue::B_STOP

fix #15263

Change-Id: Icd305668365067a89f3f952465bfe2aef84e8d0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2045
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# cdb7e817 18-May-2018 Murai Takashi <tmurai01@gmail.com>

media-add-ons/multi_audio: Remove unneed menset()

Remove unneed menset(), since media_format already use memset()
in its constructor.
Also fixes -Werror=class-memaccess pointed out by gcc8.

Change-Id: I3283417323550492799a34a2d29cdad03a82a2d5
Reviewed-on: https://review.haiku-os.org/783
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 3ef97f9a 21-Jan-2017 Axel Dörfler <axeld@pinc-software.de>

hmulti_audio.media_addon: Removed superfluous semaphore.

* The semaphore wasn't really needed to do what it did; using
atomic_{get|set}() as suggested by jua is much faster, anyway.
* Thanks to Dario for the initial work on this.


# b9f09f03 21-Jan-2017 Axel Dörfler <axeld@pinc-software.de>

Coding style cleanup.


# a8e8f7ba 20-Jan-2017 Dario Casalinuovo <b.vitruvio@gmail.com>

Revert "MultiAudioNode: Fix and polish output locking issues"

This reverts commit 19da5e15c33f9a85d1e4ca0779f5082fd9d1eaf0.


# 19da5e15 20-Jan-2017 Dario Casalinuovo <b.vitruvio@gmail.com>

MultiAudioNode: Fix and polish output locking issues

* For people involved please review, too much confusion seems
to have been done in past.
* The fBufferFreeSem is removed as it didn't make sense. It was
used to detected when the output thread should be stopped, a
boolean flag is used instead.
* Avoid to allocate a BAutolocker at begin of the _OutputThread,
plain Lock/Unlock is used instead.
* The fBufferLock is now locked when a buffer is handled.


# 730d0700 02-Feb-2016 Dario Casalinuovo <b.vitruvio@gmail.com>

MultiAudioNode: Remove custom lateness code


# 6d2f2ec1 24-Jul-2015 Dario Casalinuovo <b.vitruvio@gmail.com>

Rework nodes to call Run() only after registration

* While it should not be a big problem the
bebook specify to do it after custom operations,
most nodes also follow this way, this commit restore
consistency.


# e3b2c4ef 14-Apr-2015 Dario Casalinuovo <b.vitruvio@gmail.com>

multi_audio_node: check BBufferGroup init errors


# 1a7bcf69 01-Jun-2014 Oliver Tappe <zooey@hirschkaefer.de>

Lots of B_PRI... insertions to fix errors with DEBUG=1.


# 217c8a17 10-May-2013 Jérôme Duval <jerome.duval@gmail.com>

multi_audio.media_addon: fixes 64 bit warnings


# fee16776 29-Dec-2012 Dancsó Róbert <dancso.robert@d-rendszer.hu>

Added localization support for Haiku Multi Audio media addon.

Signed-off-by: Jerome Duval <jerome.duval@gmail.com>


# ea81d6ea 24-Jan-2012 Jerome Leveque <leveque.jerome@gmail.com>

multi_audio: Add multiple Audio In Feature, implement listed TODO

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>


# eaa6a6c4 18-Jan-2012 Jerome Leveque <leveque.jerome@gmail.com>

multi_audio: Add support for input/output framerate change

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>


# 3e9336fd 04-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

* Small coding style fixes and improved naming
of the thread related methods.
* Explicitely reset the fThread member in
_StopOutputThread().
* Added TODO about the somewhat seemingly fragile method
to ensure the previous buffer for a channel has
been processed.


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


# b289aaf6 12-Apr-2010 Axel Dörfler <axeld@pinc-software.de>

* A BBuffer does not know where it came from, so
BBufferConsumer::BufferReceived() cannot know whom to send the "buffer is
late" notification (unless we only have a single input). To solve this, the
media_header now contains extra fields that can be used to create a
media_source object.
* Unfortunately, BBufferProducer::SendBuffer() cannot know the output either in
case there is more than one. Hence, I deprecated the existing SendBuffer()
call and moved it into "private" - IOW old sources using it won't compile
anymore under Haiku.
* I introduced a new SendBuffer() variant that also gets the media_source as
argument.
* Updated all sources (that are part of the image) to use the new variant.
* Removed some purposely commented out code in the audio mixer.
* Implemented late buffer notification, as well as late buffer handling in the
audio mixer; this is a bit of work in progress, so the debug output is left
in there.
* Some cleanup.


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


# 9c3ad4fb 16-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Use TimeComputer to get smoother performance times.
* SetParameterValue(): Don't do anything, if the new output frequency value
is the same as before. This avoids hickups when switching between the pages
in the Media preflet.
* _FillNextBuffer(): Compare BBuffer and stream buffer size. They might
differ directly after setting another output frequency, which could cause
a crash.


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


# faf3d799 11-Dec-2009 Jérôme Duval <korli@users.berlios.de>

the sample rate label is Hz, not kHz.


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


# d473f576 10-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added support for setting the output frequency. Also done some preparation for
setting the input frequency, but I'm too lazy and not interested in the feature
to actually implement it.
For some reason the setting is not persistent. But the other parameters don't
seem to be persistent either, so this is apparently a general problem.


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


# 35a25fae 10-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Automatic whitespace cleanup.


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


# 4b574279 29-Jul-2009 Jérôme Duval <korli@users.berlios.de>

uses different preferred media formats for input and output.


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


# 04a72492 15-Dec-2008 Jérôme Duval <korli@users.berlios.de>

fix my last change for muxers controls


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


# c6e951f4 14-Dec-2008 Jérôme Duval <korli@users.berlios.de>

use control index as parameter id, instead of control id


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


# f12491c7 17-Nov-2008 Jérôme Duval <korli@users.berlios.de>

added Headphones and SPDIF string constants


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


# edf6624b 15-Sep-2008 Jérôme Duval <korli@users.berlios.de>

* fix debug build
* publish a performance time before starting, so that others wait for us with valid values: this enables running with larger audio buffers
* don't publish a performance time before having a non null old realtime (at least two buffer exchanges)
* don't dereference config pointer before checking it is not null
* if we don't find an input for a buffer, we also recycle the buffer


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


# f67bbdb2 08-Jul-2008 Jérôme Duval <korli@users.berlios.de>

fixed warnings
use playback rate as preferred rate (instead of record)


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


# 4aef1c02 29-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

Followed Marcus' suggestion and use strlcpy() instead of strncpy() for Haiku.


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


# f89d079f 28-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* MultiAudioAddOn::_RecursiveScan() now checks the depth of the recursion,
and bails out early.
* InitCheck() now actually returns an error if something went wrong during
initialization.
* Cleanup, part III.


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


# d5420ddc 28-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* When setting the global format, MultiAudioDevice::_InitDriver() will no
longer return on failure.
* Also, it will now retrieve the global format from the audio device
afterwards always and uses that.
* Cleanup of MultiAudioNode, part II.


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


# 5da3fbc8 25-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* Moved general multi_audio functions into their own file MultiAudioUtility.cpp;
they don't really belong to the MultiAudioDevice class.
* Major coding style cleanup, part I - no functional change, I hope :-)


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


# 2d01adea 01-Nov-2007 Jérôme Duval <korli@users.berlios.de>

clean up


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


# a9383a86 30-Jul-2007 Jérôme Duval <korli@users.berlios.de>

now checks buffer_cycle field for playback and record
clean up


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


# f616df6a 06-Feb-2006 Jérôme Duval <korli@users.berlios.de>

multi media addon builds on beos, fixed include missing
added B_AUDIO_INT support and valid_bits use


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


# 758b1d0e 12-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
Otherwise the an inner class with that name is considered as friend.
gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



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


# bbf5eb3a 30-Mar-2005 Jérôme Duval <korli@users.berlios.de>

add a check which helps avoid crashs


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


# 613b4e11 20-Nov-2004 shatty <shatty@nowhere.fake>

address compiler warnings


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


# e75df357 14-Oct-2003 Jérôme Duval <korli@users.berlios.de>

internal latency = 1 buffer


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


# c7116c91 10-Sep-2003 Jérôme Duval <korli@users.berlios.de>

Added more than two buffers support + various fixes


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


# c0ecc313 15-Aug-2003 shatty <shatty@nowhere.fake>

fix compile with DEBUG on by changing arguments to PRINT_OBJECT


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


# 2386ff94 04-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added missing include.


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


# 9bedd42c 29-May-2003 beveloper <beveloper@nowhere.fake>

many fixes to improve timing


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


# c8093d3c 02-May-2003 Jérôme Duval <korli@users.berlios.de>

ParameterWeb state is now saved and restored for each node.


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


# 056e08e2 20-Apr-2003 Jérôme Duval <korli@users.berlios.de>

Cleanups


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


# be4e0101 17-Mar-2003 beveloper <beveloper@nowhere.fake>

The multi_audio media addon, written by Jerome Duval.


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


# 6d2f2ec177bf615a117a7428d71be4330545b320 24-Jul-2015 Dario Casalinuovo <b.vitruvio@gmail.com>

Rework nodes to call Run() only after registration

* While it should not be a big problem the
bebook specify to do it after custom operations,
most nodes also follow this way, this commit restore
consistency.


# e3b2c4efea0a023135ef34d27e6b72f9454f5a12 14-Apr-2015 Dario Casalinuovo <b.vitruvio@gmail.com>

multi_audio_node: check BBufferGroup init errors


# 1a7bcf6962e1c99906cce0fe602e08c3fcda46f6 01-Jun-2014 Oliver Tappe <zooey@hirschkaefer.de>

Lots of B_PRI... insertions to fix errors with DEBUG=1.


# 217c8a17a8777e119c2b389c493a8d8218d65679 10-May-2013 Jérôme Duval <jerome.duval@gmail.com>

multi_audio.media_addon: fixes 64 bit warnings


# fee167763070c6b29012ca67fab9a619dc19d74d 29-Dec-2012 Dancsó Róbert <dancso.robert@d-rendszer.hu>

Added localization support for Haiku Multi Audio media addon.

Signed-off-by: Jerome Duval <jerome.duval@gmail.com>


# ea81d6eaf00849fcf8bb46d5e2c2f59142dfc19b 24-Jan-2012 Jerome Leveque <leveque.jerome@gmail.com>

multi_audio: Add multiple Audio In Feature, implement listed TODO

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>


# eaa6a6c40ce5fe430881e92a94add75f0a7f6e1b 18-Jan-2012 Jerome Leveque <leveque.jerome@gmail.com>

multi_audio: Add support for input/output framerate change

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>


# 3e9336fd206359402b409e523317307a1a3e13b1 04-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

* Small coding style fixes and improved naming
of the thread related methods.
* Explicitely reset the fThread member in
_StopOutputThread().
* Added TODO about the somewhat seemingly fragile method
to ensure the previous buffer for a channel has
been processed.


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


# b289aaf66bbf6e173aa90fa194fc256965f1b34d 12-Apr-2010 Axel Dörfler <axeld@pinc-software.de>

* A BBuffer does not know where it came from, so
BBufferConsumer::BufferReceived() cannot know whom to send the "buffer is
late" notification (unless we only have a single input). To solve this, the
media_header now contains extra fields that can be used to create a
media_source object.
* Unfortunately, BBufferProducer::SendBuffer() cannot know the output either in
case there is more than one. Hence, I deprecated the existing SendBuffer()
call and moved it into "private" - IOW old sources using it won't compile
anymore under Haiku.
* I introduced a new SendBuffer() variant that also gets the media_source as
argument.
* Updated all sources (that are part of the image) to use the new variant.
* Removed some purposely commented out code in the audio mixer.
* Implemented late buffer notification, as well as late buffer handling in the
audio mixer; this is a bit of work in progress, so the debug output is left
in there.
* Some cleanup.


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


# 9c3ad4fbb0ec72806265552b200305f851aff5d3 16-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Use TimeComputer to get smoother performance times.
* SetParameterValue(): Don't do anything, if the new output frequency value
is the same as before. This avoids hickups when switching between the pages
in the Media preflet.
* _FillNextBuffer(): Compare BBuffer and stream buffer size. They might
differ directly after setting another output frequency, which could cause
a crash.


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


# faf3d7997f6b2bc7b16b1387eed667e7c12e535d 11-Dec-2009 Jérôme Duval <korli@users.berlios.de>

the sample rate label is Hz, not kHz.


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


# d473f5766f3e2168ad0427f51d6a127662d0345b 10-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added support for setting the output frequency. Also done some preparation for
setting the input frequency, but I'm too lazy and not interested in the feature
to actually implement it.
For some reason the setting is not persistent. But the other parameters don't
seem to be persistent either, so this is apparently a general problem.


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


# 35a25fae0528ee4ac0dbb9873df59853b04b866f 10-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Automatic whitespace cleanup.


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


# 4b57427974b08e2bc2528079d9514968f81c4f71 29-Jul-2009 Jérôme Duval <korli@users.berlios.de>

uses different preferred media formats for input and output.


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


# 04a72492c09af3c8618abffb727d9cbd6b8fe51c 15-Dec-2008 Jérôme Duval <korli@users.berlios.de>

fix my last change for muxers controls


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


# c6e951f4e612d5b80705697604984af903414cec 14-Dec-2008 Jérôme Duval <korli@users.berlios.de>

use control index as parameter id, instead of control id


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


# f12491c7f96a3dfb5743a0555dd1c286353c2550 17-Nov-2008 Jérôme Duval <korli@users.berlios.de>

added Headphones and SPDIF string constants


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


# edf6624bc87dd084254b6ad3562145170e067c6c 15-Sep-2008 Jérôme Duval <korli@users.berlios.de>

* fix debug build
* publish a performance time before starting, so that others wait for us with valid values: this enables running with larger audio buffers
* don't publish a performance time before having a non null old realtime (at least two buffer exchanges)
* don't dereference config pointer before checking it is not null
* if we don't find an input for a buffer, we also recycle the buffer


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


# f67bbdb2a66353272add7f1ffe34726915c437a1 08-Jul-2008 Jérôme Duval <korli@users.berlios.de>

fixed warnings
use playback rate as preferred rate (instead of record)


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


# 4aef1c02ea32b9ce39718fd8013ad477df503220 29-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

Followed Marcus' suggestion and use strlcpy() instead of strncpy() for Haiku.


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


# f89d079f4e62110b78f86f114aceeaf877c6a8a9 28-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* MultiAudioAddOn::_RecursiveScan() now checks the depth of the recursion,
and bails out early.
* InitCheck() now actually returns an error if something went wrong during
initialization.
* Cleanup, part III.


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


# d5420ddcccdbe4a2b74b0e63a31cc62886adfe3d 28-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* When setting the global format, MultiAudioDevice::_InitDriver() will no
longer return on failure.
* Also, it will now retrieve the global format from the audio device
afterwards always and uses that.
* Cleanup of MultiAudioNode, part II.


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


# 5da3fbc8efbe27a16162d86e250916a5fc4da765 25-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* Moved general multi_audio functions into their own file MultiAudioUtility.cpp;
they don't really belong to the MultiAudioDevice class.
* Major coding style cleanup, part I - no functional change, I hope :-)


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


# 2d01adeaf4911597865275142932676a5f1ad3ba 01-Nov-2007 Jérôme Duval <korli@users.berlios.de>

clean up


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


# a9383a861c709c55be57cada81c00299f503cf8e 30-Jul-2007 Jérôme Duval <korli@users.berlios.de>

now checks buffer_cycle field for playback and record
clean up


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


# f616df6a183aee750f23207449674714049af144 06-Feb-2006 Jérôme Duval <korli@users.berlios.de>

multi media addon builds on beos, fixed include missing
added B_AUDIO_INT support and valid_bits use


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


# 758b1d0e05fe1042cce6e00d194a147802d4f9be 12-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
Otherwise the an inner class with that name is considered as friend.
gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



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


# bbf5eb3ac62e4c6798f39b82ed910f501f9c46e0 30-Mar-2005 Jérôme Duval <korli@users.berlios.de>

add a check which helps avoid crashs


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


# 613b4e1131046e9456ba81fd050219666389d6c1 20-Nov-2004 shatty <shatty@nowhere.fake>

address compiler warnings


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


# e75df357b9840becdbdc363eda77b33edd81765e 14-Oct-2003 Jérôme Duval <korli@users.berlios.de>

internal latency = 1 buffer


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


# c7116c911444ceddd4147edc8e3523dcb076638f 10-Sep-2003 Jérôme Duval <korli@users.berlios.de>

Added more than two buffers support + various fixes


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


# c0ecc313289811dc65b07108c3fcb5699fa975c1 15-Aug-2003 shatty <shatty@nowhere.fake>

fix compile with DEBUG on by changing arguments to PRINT_OBJECT


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


# 2386ff94ad624b459a21709aba1a4e3993d7f1db 04-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added missing include.


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


# 9bedd42cd1e0fdb44e39be7ef4f3c76786d59b50 29-May-2003 beveloper <beveloper@nowhere.fake>

many fixes to improve timing


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


# c8093d3c8dd0841abcb80ea7efd760a8455a7aac 02-May-2003 Jérôme Duval <korli@users.berlios.de>

ParameterWeb state is now saved and restored for each node.


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


# 056e08e286c2b2129f11eb34ccc0b6b896016b77 20-Apr-2003 Jérôme Duval <korli@users.berlios.de>

Cleanups


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


# be4e010170a900c3c38b00e17f6104a7bdb938ed 17-Mar-2003 beveloper <beveloper@nowhere.fake>

The multi_audio media addon, written by Jerome Duval.


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