Coding style cleanup.
This commit is contained in:
@@ -3,7 +3,8 @@
|
|||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//! Multi-audio replacement media addon for BeOS
|
|
||||||
|
//! Media add-on for drivers that use the multi audio interface
|
||||||
|
|
||||||
|
|
||||||
#include "MultiAudioNode.h"
|
#include "MultiAudioNode.h"
|
||||||
@@ -67,7 +68,7 @@ public:
|
|||||||
uint64 fSamplesSent;
|
uint64 fSamplesSent;
|
||||||
volatile uint32 fBufferCycle;
|
volatile uint32 fBufferCycle;
|
||||||
multi_buffer_info fOldBufferInfo;
|
multi_buffer_info fOldBufferInfo;
|
||||||
Resampler *fResampler;
|
Resampler* fResampler;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -193,33 +194,48 @@ MultiAudioNode::MultiAudioNode(BMediaAddOn* addon, const char* name,
|
|||||||
AddNodeKind(B_PHYSICAL_INPUT);
|
AddNodeKind(B_PHYSICAL_INPUT);
|
||||||
|
|
||||||
// initialize our preferred format objects
|
// initialize our preferred format objects
|
||||||
memset(&fOutputPreferredFormat, 0, sizeof(fOutputPreferredFormat)); // set everything to wildcard first
|
memset(&fOutputPreferredFormat, 0, sizeof(fOutputPreferredFormat));
|
||||||
|
// set everything to wildcard first
|
||||||
fOutputPreferredFormat.type = B_MEDIA_RAW_AUDIO;
|
fOutputPreferredFormat.type = B_MEDIA_RAW_AUDIO;
|
||||||
fOutputPreferredFormat.u.raw_audio.format = MultiAudio::convert_to_media_format(fDevice->FormatInfo().output.format);
|
fOutputPreferredFormat.u.raw_audio.format
|
||||||
fOutputPreferredFormat.u.raw_audio.valid_bits = MultiAudio::convert_to_valid_bits(fDevice->FormatInfo().output.format);
|
= MultiAudio::convert_to_media_format(
|
||||||
|
fDevice->FormatInfo().output.format);
|
||||||
|
fOutputPreferredFormat.u.raw_audio.valid_bits
|
||||||
|
= MultiAudio::convert_to_valid_bits(
|
||||||
|
fDevice->FormatInfo().output.format);
|
||||||
fOutputPreferredFormat.u.raw_audio.channel_count = 2;
|
fOutputPreferredFormat.u.raw_audio.channel_count = 2;
|
||||||
fOutputPreferredFormat.u.raw_audio.frame_rate = MultiAudio::convert_to_sample_rate(fDevice->FormatInfo().output.rate); // measured in Hertz
|
fOutputPreferredFormat.u.raw_audio.frame_rate
|
||||||
|
= MultiAudio::convert_to_sample_rate(fDevice->FormatInfo().output.rate);
|
||||||
|
// measured in Hertz
|
||||||
fOutputPreferredFormat.u.raw_audio.byte_order = B_MEDIA_HOST_ENDIAN;
|
fOutputPreferredFormat.u.raw_audio.byte_order = B_MEDIA_HOST_ENDIAN;
|
||||||
|
|
||||||
// we'll use the consumer's preferred buffer size, if any
|
// we'll use the consumer's preferred buffer size, if any
|
||||||
fOutputPreferredFormat.u.raw_audio.buffer_size = fDevice->BufferList().return_playback_buffer_size
|
fOutputPreferredFormat.u.raw_audio.buffer_size
|
||||||
* (fOutputPreferredFormat.u.raw_audio.format & media_raw_audio_format::B_AUDIO_SIZE_MASK)
|
= fDevice->BufferList().return_playback_buffer_size
|
||||||
* fOutputPreferredFormat.u.raw_audio.channel_count;
|
* (fOutputPreferredFormat.u.raw_audio.format
|
||||||
|
& media_raw_audio_format::B_AUDIO_SIZE_MASK)
|
||||||
|
* fOutputPreferredFormat.u.raw_audio.channel_count;
|
||||||
|
|
||||||
// initialize our preferred format objects
|
// initialize our preferred format objects
|
||||||
memset(&fInputPreferredFormat, 0, sizeof(fInputPreferredFormat)); // set everything to wildcard first
|
memset(&fInputPreferredFormat, 0, sizeof(fInputPreferredFormat));
|
||||||
|
// set everything to wildcard first
|
||||||
fInputPreferredFormat.type = B_MEDIA_RAW_AUDIO;
|
fInputPreferredFormat.type = B_MEDIA_RAW_AUDIO;
|
||||||
fInputPreferredFormat.u.raw_audio.format = MultiAudio::convert_to_media_format(fDevice->FormatInfo().input.format);
|
fInputPreferredFormat.u.raw_audio.format
|
||||||
fInputPreferredFormat.u.raw_audio.valid_bits = MultiAudio::convert_to_valid_bits(fDevice->FormatInfo().input.format);
|
= MultiAudio::convert_to_media_format(
|
||||||
|
fDevice->FormatInfo().input.format);
|
||||||
|
fInputPreferredFormat.u.raw_audio.valid_bits
|
||||||
|
= MultiAudio::convert_to_valid_bits(fDevice->FormatInfo().input.format);
|
||||||
fInputPreferredFormat.u.raw_audio.channel_count = 2;
|
fInputPreferredFormat.u.raw_audio.channel_count = 2;
|
||||||
fInputPreferredFormat.u.raw_audio.frame_rate = MultiAudio::convert_to_sample_rate(fDevice->FormatInfo().input.rate); // measured in Hertz
|
fInputPreferredFormat.u.raw_audio.frame_rate
|
||||||
|
= MultiAudio::convert_to_sample_rate(fDevice->FormatInfo().input.rate); // measured in Hertz
|
||||||
fInputPreferredFormat.u.raw_audio.byte_order = B_MEDIA_HOST_ENDIAN;
|
fInputPreferredFormat.u.raw_audio.byte_order = B_MEDIA_HOST_ENDIAN;
|
||||||
|
|
||||||
// we'll use the consumer's preferred buffer size, if any
|
// we'll use the consumer's preferred buffer size, if any
|
||||||
fInputPreferredFormat.u.raw_audio.buffer_size = fDevice->BufferList().return_record_buffer_size
|
fInputPreferredFormat.u.raw_audio.buffer_size
|
||||||
* (fInputPreferredFormat.u.raw_audio.format & media_raw_audio_format::B_AUDIO_SIZE_MASK)
|
= fDevice->BufferList().return_record_buffer_size
|
||||||
* fInputPreferredFormat.u.raw_audio.channel_count;
|
* (fInputPreferredFormat.u.raw_audio.format
|
||||||
|
& media_raw_audio_format::B_AUDIO_SIZE_MASK)
|
||||||
|
* fInputPreferredFormat.u.raw_audio.channel_count;
|
||||||
|
|
||||||
if (config != NULL) {
|
if (config != NULL) {
|
||||||
fConfig = *config;
|
fConfig = *config;
|
||||||
@@ -237,8 +253,6 @@ MultiAudioNode::~MultiAudioNode()
|
|||||||
|
|
||||||
_StopOutputThread();
|
_StopOutputThread();
|
||||||
BMediaEventLooper::Quit();
|
BMediaEventLooper::Quit();
|
||||||
|
|
||||||
fWeb = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -258,24 +272,29 @@ MultiAudioNode::GetFlavor(flavor_info* info, int32 id)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
info->flavor_flags = 0;
|
info->flavor_flags = 0;
|
||||||
info->possible_count = 1; // one flavor at a time
|
info->possible_count = 1;
|
||||||
info->in_format_count = 0; // no inputs
|
// one flavor at a time
|
||||||
|
info->in_format_count = 0;
|
||||||
|
// no inputs
|
||||||
info->in_formats = 0;
|
info->in_formats = 0;
|
||||||
info->out_format_count = 0; // no outputs
|
info->out_format_count = 0;
|
||||||
|
// no outputs
|
||||||
info->out_formats = 0;
|
info->out_formats = 0;
|
||||||
info->internal_id = id;
|
info->internal_id = id;
|
||||||
|
|
||||||
info->name = (char*)"MultiAudioNode Node";
|
info->name = const_cast<char*>("MultiAudioNode Node");
|
||||||
info->info = (char*)"The MultiAudioNode node outputs to multi_audio "
|
info->info = const_cast<char*>("The MultiAudioNode node outputs to "
|
||||||
"drivers.";
|
"multi_audio drivers.");
|
||||||
info->kinds = B_BUFFER_CONSUMER | B_BUFFER_PRODUCER | B_TIME_SOURCE
|
info->kinds = B_BUFFER_CONSUMER | B_BUFFER_PRODUCER | B_TIME_SOURCE
|
||||||
| B_PHYSICAL_OUTPUT | B_PHYSICAL_INPUT | B_CONTROLLABLE;
|
| B_PHYSICAL_OUTPUT | B_PHYSICAL_INPUT | B_CONTROLLABLE;
|
||||||
info->in_format_count = 1; // 1 input
|
info->in_format_count = 1;
|
||||||
|
// 1 input
|
||||||
media_format* inFormats = new media_format[info->in_format_count];
|
media_format* inFormats = new media_format[info->in_format_count];
|
||||||
GetFormat(&inFormats[0]);
|
GetFormat(&inFormats[0]);
|
||||||
info->in_formats = inFormats;
|
info->in_formats = inFormats;
|
||||||
|
|
||||||
info->out_format_count = 1; // 1 output
|
info->out_format_count = 1;
|
||||||
|
// 1 output
|
||||||
media_format* outFormats = new media_format[info->out_format_count];
|
media_format* outFormats = new media_format[info->out_format_count];
|
||||||
GetFormat(&outFormats[0]);
|
GetFormat(&outFormats[0]);
|
||||||
info->out_formats = outFormats;
|
info->out_formats = outFormats;
|
||||||
@@ -315,7 +334,7 @@ void
|
|||||||
MultiAudioNode::Preroll()
|
MultiAudioNode::Preroll()
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
// XXX:Performance opportunity
|
// TODO: Performance opportunity
|
||||||
BMediaNode::Preroll();
|
BMediaNode::Preroll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,15 +362,21 @@ MultiAudioNode::NodeRegistered()
|
|||||||
|
|
||||||
for (int32 i = 0; i < fDevice->Description().output_channel_count; i++) {
|
for (int32 i = 0; i < fDevice->Description().output_channel_count; i++) {
|
||||||
if (currentInput == NULL
|
if (currentInput == NULL
|
||||||
|| (fDevice->Description().channels[i].designations & B_CHANNEL_MONO_BUS)
|
|| (fDevice->Description().channels[i].designations
|
||||||
|| (fDevice->Description().channels[currentId].designations & B_CHANNEL_STEREO_BUS
|
& B_CHANNEL_MONO_BUS) != 0
|
||||||
&& ( fDevice->Description().channels[i].designations & B_CHANNEL_LEFT ||
|
|| ((fDevice->Description().channels[currentId].designations
|
||||||
!(fDevice->Description().channels[i].designations & B_CHANNEL_STEREO_BUS)))
|
& B_CHANNEL_STEREO_BUS) != 0
|
||||||
|| (fDevice->Description().channels[currentId].designations & B_CHANNEL_SURROUND_BUS
|
&& ((fDevice->Description().channels[i].designations
|
||||||
&& ( fDevice->Description().channels[i].designations & B_CHANNEL_LEFT ||
|
& B_CHANNEL_LEFT) != 0
|
||||||
!(fDevice->Description().channels[i].designations & B_CHANNEL_SURROUND_BUS)))
|
|| (fDevice->Description().channels[i].designations
|
||||||
) {
|
& B_CHANNEL_STEREO_BUS) == 0))
|
||||||
PRINT(("NodeRegistered() : creating an input for %" B_PRIi32 "\n",
|
|| ((fDevice->Description().channels[currentId].designations
|
||||||
|
& B_CHANNEL_SURROUND_BUS) != 0
|
||||||
|
&& ((fDevice->Description().channels[i].designations
|
||||||
|
& B_CHANNEL_LEFT) != 0
|
||||||
|
|| (fDevice->Description().channels[i].designations
|
||||||
|
& B_CHANNEL_SURROUND_BUS) == 0))) {
|
||||||
|
PRINT(("NodeRegistered(): creating an input for %" B_PRIi32 "\n",
|
||||||
i));
|
i));
|
||||||
PRINT(("%" B_PRId32 "\t%d\t0x%" B_PRIx32 "\t0x%" B_PRIx32 "\n",
|
PRINT(("%" B_PRId32 "\t%d\t0x%" B_PRIx32 "\t0x%" B_PRIx32 "\n",
|
||||||
fDevice->Description().channels[i].channel_id,
|
fDevice->Description().channels[i].channel_id,
|
||||||
@@ -375,16 +400,18 @@ MultiAudioNode::NodeRegistered()
|
|||||||
Resampler(currentInput->fPreferredFormat.AudioFormat(),
|
Resampler(currentInput->fPreferredFormat.AudioFormat(),
|
||||||
fOutputPreferredFormat.AudioFormat());
|
fOutputPreferredFormat.AudioFormat());
|
||||||
|
|
||||||
currentInput->fChannelId = fDevice->Description().channels[i].channel_id;
|
currentInput->fChannelId
|
||||||
|
= fDevice->Description().channels[i].channel_id;
|
||||||
fInputs.AddItem(currentInput);
|
fInputs.AddItem(currentInput);
|
||||||
|
|
||||||
currentId = i;
|
currentId = i;
|
||||||
} else {
|
} else {
|
||||||
PRINT(("NodeRegistered() : adding a channel\n"));
|
PRINT(("NodeRegistered(): adding a channel\n"));
|
||||||
currentInput->fPreferredFormat.u.raw_audio.channel_count++;
|
currentInput->fPreferredFormat.u.raw_audio.channel_count++;
|
||||||
currentInput->fInput.format = currentInput->fPreferredFormat;
|
currentInput->fInput.format = currentInput->fPreferredFormat;
|
||||||
}
|
}
|
||||||
currentInput->fInput.format.u.raw_audio.format = media_raw_audio_format::wildcard.format;
|
currentInput->fInput.format.u.raw_audio.format
|
||||||
|
= media_raw_audio_format::wildcard.format;
|
||||||
}
|
}
|
||||||
|
|
||||||
node_output *currentOutput = NULL;
|
node_output *currentOutput = NULL;
|
||||||
@@ -394,15 +421,21 @@ MultiAudioNode::NodeRegistered()
|
|||||||
i < fDevice->Description().output_channel_count
|
i < fDevice->Description().output_channel_count
|
||||||
+ fDevice->Description().input_channel_count; i++) {
|
+ fDevice->Description().input_channel_count; i++) {
|
||||||
if (currentOutput == NULL
|
if (currentOutput == NULL
|
||||||
|| (fDevice->Description().channels[i].designations & B_CHANNEL_MONO_BUS)
|
|| (fDevice->Description().channels[i].designations
|
||||||
|| (fDevice->Description().channels[currentId].designations & B_CHANNEL_STEREO_BUS
|
& B_CHANNEL_MONO_BUS) != 0
|
||||||
&& ( fDevice->Description().channels[i].designations & B_CHANNEL_LEFT ||
|
|| ((fDevice->Description().channels[currentId].designations
|
||||||
!(fDevice->Description().channels[i].designations & B_CHANNEL_STEREO_BUS)))
|
& B_CHANNEL_STEREO_BUS) != 0
|
||||||
|| (fDevice->Description().channels[currentId].designations & B_CHANNEL_SURROUND_BUS
|
&& ((fDevice->Description().channels[i].designations
|
||||||
&& ( fDevice->Description().channels[i].designations & B_CHANNEL_LEFT ||
|
& B_CHANNEL_LEFT) != 0
|
||||||
!(fDevice->Description().channels[i].designations & B_CHANNEL_SURROUND_BUS)))
|
|| (fDevice->Description().channels[i].designations
|
||||||
) {
|
& B_CHANNEL_STEREO_BUS) == 0))
|
||||||
PRINT(("NodeRegistered() : creating an output for %" B_PRIi32 "\n",
|
|| ((fDevice->Description().channels[currentId].designations
|
||||||
|
& B_CHANNEL_SURROUND_BUS) != 0
|
||||||
|
&& ((fDevice->Description().channels[i].designations
|
||||||
|
& B_CHANNEL_LEFT) != 0
|
||||||
|
|| (fDevice->Description().channels[i].designations
|
||||||
|
& B_CHANNEL_SURROUND_BUS) == 0))) {
|
||||||
|
PRINT(("NodeRegistered(): creating an output for %" B_PRIi32 "\n",
|
||||||
i));
|
i));
|
||||||
PRINT(("%" B_PRId32 "\t%d\t0x%" B_PRIx32 "\t0x%" B_PRIx32 "\n",
|
PRINT(("%" B_PRId32 "\t%d\t0x%" B_PRIx32 "\t0x%" B_PRIx32 "\n",
|
||||||
fDevice->Description().channels[i].channel_id,
|
fDevice->Description().channels[i].channel_id,
|
||||||
@@ -427,12 +460,13 @@ MultiAudioNode::NodeRegistered()
|
|||||||
Resampler(fInputPreferredFormat.AudioFormat(),
|
Resampler(fInputPreferredFormat.AudioFormat(),
|
||||||
currentOutput->fPreferredFormat.AudioFormat());
|
currentOutput->fPreferredFormat.AudioFormat());
|
||||||
|
|
||||||
currentOutput->fChannelId = fDevice->Description().channels[i].channel_id;
|
currentOutput->fChannelId
|
||||||
|
= fDevice->Description().channels[i].channel_id;
|
||||||
fOutputs.AddItem(currentOutput);
|
fOutputs.AddItem(currentOutput);
|
||||||
|
|
||||||
currentId = i;
|
currentId = i;
|
||||||
} else {
|
} else {
|
||||||
PRINT(("NodeRegistered() : adding a channel\n"));
|
PRINT(("NodeRegistered(): adding a channel\n"));
|
||||||
currentOutput->fPreferredFormat.u.raw_audio.channel_count++;
|
currentOutput->fPreferredFormat.u.raw_audio.channel_count++;
|
||||||
currentOutput->fOutput.format = currentOutput->fPreferredFormat;
|
currentOutput->fOutput.format = currentOutput->fPreferredFormat;
|
||||||
}
|
}
|
||||||
@@ -459,7 +493,7 @@ MultiAudioNode::NodeRegistered()
|
|||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINT(("apply configuration in : %" B_PRIdBIGTIME "\n",
|
PRINT(("apply configuration in: %" B_PRIdBIGTIME "\n",
|
||||||
system_time() - start));
|
system_time() - start));
|
||||||
|
|
||||||
SetPriority(B_REAL_TIME_PRIORITY);
|
SetPriority(B_REAL_TIME_PRIORITY);
|
||||||
@@ -543,14 +577,19 @@ MultiAudioNode::AcceptFormat(const media_destination& dest,
|
|||||||
format->u.raw_audio.format = media_raw_audio_format::B_AUDIO_FLOAT;
|
format->u.raw_audio.format = media_raw_audio_format::B_AUDIO_FLOAT;
|
||||||
else*/
|
else*/
|
||||||
format->u.raw_audio.format = channel->fPreferredFormat.u.raw_audio.format;
|
format->u.raw_audio.format = channel->fPreferredFormat.u.raw_audio.format;
|
||||||
format->u.raw_audio.valid_bits = channel->fPreferredFormat.u.raw_audio.valid_bits;
|
format->u.raw_audio.valid_bits
|
||||||
|
= channel->fPreferredFormat.u.raw_audio.valid_bits;
|
||||||
|
|
||||||
format->u.raw_audio.frame_rate = channel->fPreferredFormat.u.raw_audio.frame_rate;
|
format->u.raw_audio.frame_rate
|
||||||
format->u.raw_audio.channel_count = channel->fPreferredFormat.u.raw_audio.channel_count;
|
= channel->fPreferredFormat.u.raw_audio.frame_rate;
|
||||||
|
format->u.raw_audio.channel_count
|
||||||
|
= channel->fPreferredFormat.u.raw_audio.channel_count;
|
||||||
format->u.raw_audio.byte_order = B_MEDIA_HOST_ENDIAN;
|
format->u.raw_audio.byte_order = B_MEDIA_HOST_ENDIAN;
|
||||||
format->u.raw_audio.buffer_size = fDevice->BufferList().return_playback_buffer_size
|
format->u.raw_audio.buffer_size
|
||||||
* (format->u.raw_audio.format & media_raw_audio_format::B_AUDIO_SIZE_MASK)
|
= fDevice->BufferList().return_playback_buffer_size
|
||||||
* format->u.raw_audio.channel_count;
|
* (format->u.raw_audio.format
|
||||||
|
& media_raw_audio_format::B_AUDIO_SIZE_MASK)
|
||||||
|
* format->u.raw_audio.channel_count;
|
||||||
|
|
||||||
/*media_format myFormat;
|
/*media_format myFormat;
|
||||||
GetFormat(&myFormat);
|
GetFormat(&myFormat);
|
||||||
@@ -573,10 +612,10 @@ MultiAudioNode::GetNextInput(int32* cookie, media_input* _input)
|
|||||||
if (*cookie >= fInputs.CountItems() || *cookie < 0)
|
if (*cookie >= fInputs.CountItems() || *cookie < 0)
|
||||||
return B_BAD_INDEX;
|
return B_BAD_INDEX;
|
||||||
|
|
||||||
node_input *channel = (node_input *)fInputs.ItemAt(*cookie);
|
node_input* channel = (node_input*)fInputs.ItemAt(*cookie);
|
||||||
*_input = channel->fInput;
|
*_input = channel->fInput;
|
||||||
*cookie += 1;
|
*cookie += 1;
|
||||||
PRINT(("input.format : %" B_PRIu32 "\n",
|
PRINT(("input.format: %" B_PRIu32 "\n",
|
||||||
channel->fInput.format.u.raw_audio.format));
|
channel->fInput.format.u.raw_audio.format));
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
@@ -605,22 +644,26 @@ MultiAudioNode::BufferReceived(BBuffer* buffer)
|
|||||||
}
|
}
|
||||||
break;*/
|
break;*/
|
||||||
case B_MEDIA_RAW_AUDIO:
|
case B_MEDIA_RAW_AUDIO:
|
||||||
if (buffer->Flags() & BBuffer::B_SMALL_BUFFER) {
|
if ((buffer->Flags() & BBuffer::B_SMALL_BUFFER) != 0) {
|
||||||
fprintf(stderr,"NOT IMPLEMENTED: B_SMALL_BUFFER in MultiAudioNode::BufferReceived\n");
|
fprintf(stderr, "NOT IMPLEMENTED: B_SMALL_BUFFER in "
|
||||||
// XXX: implement this part
|
"MultiAudioNode::BufferReceived\n");
|
||||||
|
// TODO: implement this part
|
||||||
buffer->Recycle();
|
buffer->Recycle();
|
||||||
} else {
|
} else {
|
||||||
media_timed_event event(buffer->Header()->start_time, BTimedEventQueue::B_HANDLE_BUFFER,
|
media_timed_event event(buffer->Header()->start_time,
|
||||||
buffer, BTimedEventQueue::B_RECYCLE_BUFFER);
|
BTimedEventQueue::B_HANDLE_BUFFER, buffer,
|
||||||
|
BTimedEventQueue::B_RECYCLE_BUFFER);
|
||||||
status_t status = EventQueue()->AddEvent(event);
|
status_t status = EventQueue()->AddEvent(event);
|
||||||
if (status != B_OK) {
|
if (status != B_OK) {
|
||||||
fprintf(stderr,"EventQueue()->AddEvent(event) in MultiAudioNode::BufferReceived failed\n");
|
fprintf(stderr, "EventQueue()->AddEvent(event) in "
|
||||||
|
"MultiAudioNode::BufferReceived failed\n");
|
||||||
buffer->Recycle();
|
buffer->Recycle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr,"unexpected buffer type in MultiAudioNode::BufferReceived\n");
|
fprintf(stderr, "unexpected buffer type in "
|
||||||
|
"MultiAudioNode::BufferReceived\n");
|
||||||
buffer->Recycle();
|
buffer->Recycle();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -631,11 +674,10 @@ void
|
|||||||
MultiAudioNode::ProducerDataStatus(const media_destination& forWhom,
|
MultiAudioNode::ProducerDataStatus(const media_destination& forWhom,
|
||||||
int32 status, bigtime_t atPerformanceTime)
|
int32 status, bigtime_t atPerformanceTime)
|
||||||
{
|
{
|
||||||
//CALLED();
|
node_input* channel = _FindInput(forWhom);
|
||||||
|
|
||||||
node_input *channel = _FindInput(forWhom);
|
|
||||||
if (channel == NULL) {
|
if (channel == NULL) {
|
||||||
fprintf(stderr,"invalid destination received in MultiAudioNode::ProducerDataStatus\n");
|
fprintf(stderr, "invalid destination received in "
|
||||||
|
"MultiAudioNode::ProducerDataStatus\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -653,7 +695,7 @@ MultiAudioNode::GetLatencyFor(const media_destination& forWhom,
|
|||||||
if (_latency == NULL || _timeSource == NULL)
|
if (_latency == NULL || _timeSource == NULL)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
node_input *channel = _FindInput(forWhom);
|
node_input* channel = _FindInput(forWhom);
|
||||||
if (channel == NULL)
|
if (channel == NULL)
|
||||||
return B_MEDIA_BAD_DESTINATION;
|
return B_MEDIA_BAD_DESTINATION;
|
||||||
|
|
||||||
@@ -671,11 +713,10 @@ MultiAudioNode::Connected(const media_source& producer,
|
|||||||
CALLED();
|
CALLED();
|
||||||
if (out_input == 0) {
|
if (out_input == 0) {
|
||||||
fprintf(stderr, "<- B_BAD_VALUE\n");
|
fprintf(stderr, "<- B_BAD_VALUE\n");
|
||||||
return B_BAD_VALUE; // no crashing
|
return B_BAD_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
node_input *channel = _FindInput(where);
|
node_input* channel = _FindInput(where);
|
||||||
|
|
||||||
if (channel == NULL) {
|
if (channel == NULL) {
|
||||||
fprintf(stderr, "<- B_MEDIA_BAD_DESTINATION\n");
|
fprintf(stderr, "<- B_MEDIA_BAD_DESTINATION\n");
|
||||||
return B_MEDIA_BAD_DESTINATION;
|
return B_MEDIA_BAD_DESTINATION;
|
||||||
@@ -699,8 +740,8 @@ MultiAudioNode::Disconnected(const media_source& producer,
|
|||||||
const media_destination& where)
|
const media_destination& where)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
node_input *channel = _FindInput(where);
|
|
||||||
|
|
||||||
|
node_input* channel = _FindInput(where);
|
||||||
if (channel == NULL || channel->fInput.source != producer)
|
if (channel == NULL || channel->fInput.source != producer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -719,15 +760,15 @@ MultiAudioNode::FormatChanged(const media_source& producer,
|
|||||||
const media_format& format)
|
const media_format& format)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
node_input *channel = _FindInput(consumer);
|
|
||||||
|
|
||||||
if(channel==NULL) {
|
node_input* channel = _FindInput(consumer);
|
||||||
fprintf(stderr,"<- B_MEDIA_BAD_DESTINATION\n");
|
|
||||||
|
if (channel==NULL) {
|
||||||
|
fprintf(stderr, "<- B_MEDIA_BAD_DESTINATION\n");
|
||||||
return B_MEDIA_BAD_DESTINATION;
|
return B_MEDIA_BAD_DESTINATION;
|
||||||
}
|
}
|
||||||
if (channel->fInput.source != producer) {
|
if (channel->fInput.source != producer)
|
||||||
return B_MEDIA_BAD_SOURCE;
|
return B_MEDIA_BAD_SOURCE;
|
||||||
}
|
|
||||||
|
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
@@ -735,15 +776,12 @@ MultiAudioNode::FormatChanged(const media_source& producer,
|
|||||||
|
|
||||||
status_t
|
status_t
|
||||||
MultiAudioNode::SeekTagRequested(const media_destination& destination,
|
MultiAudioNode::SeekTagRequested(const media_destination& destination,
|
||||||
bigtime_t in_target_time,
|
bigtime_t targetTime, uint32 flags, media_seek_tag* _seekTag,
|
||||||
uint32 in_flags,
|
bigtime_t* _taggedTime, uint32* _flags)
|
||||||
media_seek_tag * out_seek_tag,
|
|
||||||
bigtime_t * out_tagged_time,
|
|
||||||
uint32 * out_flags)
|
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
return BBufferConsumer::SeekTagRequested(destination,in_target_time,in_flags,
|
return BBufferConsumer::SeekTagRequested(destination, targetTime, flags,
|
||||||
out_seek_tag,out_tagged_time,out_flags);
|
_seekTag, _taggedTime, _flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -754,13 +792,13 @@ status_t
|
|||||||
MultiAudioNode::FormatSuggestionRequested(media_type type, int32 /*quality*/,
|
MultiAudioNode::FormatSuggestionRequested(media_type type, int32 /*quality*/,
|
||||||
media_format* format)
|
media_format* format)
|
||||||
{
|
{
|
||||||
// FormatSuggestionRequested() is not necessarily part of the format negotiation
|
// FormatSuggestionRequested() is not necessarily part of the format
|
||||||
// process; it's simply an interrogation -- the caller wants to see what the node's
|
// negotiation process; it's simply an interrogation -- the caller
|
||||||
// preferred data format is, given a suggestion by the caller.
|
// wants to see what the node's preferred data format is, given a
|
||||||
|
// suggestion by the caller.
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
if (!format)
|
if (format == NULL) {
|
||||||
{
|
|
||||||
fprintf(stderr, "\tERROR - NULL format pointer passed in!\n");
|
fprintf(stderr, "\tERROR - NULL format pointer passed in!\n");
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
}
|
}
|
||||||
@@ -769,39 +807,46 @@ MultiAudioNode::FormatSuggestionRequested(media_type type, int32 /*quality*/,
|
|||||||
*format = fInputPreferredFormat;
|
*format = fInputPreferredFormat;
|
||||||
|
|
||||||
// a wildcard type is okay; we can specialize it
|
// a wildcard type is okay; we can specialize it
|
||||||
if (type == B_MEDIA_UNKNOWN_TYPE) type = B_MEDIA_RAW_AUDIO;
|
if (type == B_MEDIA_UNKNOWN_TYPE)
|
||||||
|
type = B_MEDIA_RAW_AUDIO;
|
||||||
|
|
||||||
// we only support raw audio
|
// we only support raw audio
|
||||||
if (type != B_MEDIA_RAW_AUDIO) return B_MEDIA_BAD_FORMAT;
|
if (type != B_MEDIA_RAW_AUDIO)
|
||||||
else return B_OK;
|
return B_MEDIA_BAD_FORMAT;
|
||||||
|
|
||||||
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
MultiAudioNode::FormatProposal(const media_source& output, media_format* format)
|
MultiAudioNode::FormatProposal(const media_source& output, media_format* format)
|
||||||
{
|
{
|
||||||
// FormatProposal() is the first stage in the BMediaRoster::Connect() process. We hand
|
// FormatProposal() is the first stage in the BMediaRoster::Connect()
|
||||||
// out a suggested format, with wildcards for any variations we support.
|
// process. We hand out a suggested format, with wildcards for any
|
||||||
|
// variations we support.
|
||||||
CALLED();
|
CALLED();
|
||||||
node_output *channel = _FindOutput(output);
|
|
||||||
|
|
||||||
// is this a proposal for our select output?
|
// is this a proposal for our select output?
|
||||||
if (channel == NULL)
|
node_output* channel = _FindOutput(output);
|
||||||
{
|
if (channel == NULL) {
|
||||||
fprintf(stderr, "MultiAudioNode::FormatProposal returning B_MEDIA_BAD_SOURCE\n");
|
fprintf(stderr, "MultiAudioNode::FormatProposal returning "
|
||||||
|
"B_MEDIA_BAD_SOURCE\n");
|
||||||
return B_MEDIA_BAD_SOURCE;
|
return B_MEDIA_BAD_SOURCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// we only support floating-point raw audio, so we always return that, but we
|
// We only support floating-point raw audio, so we always return that,
|
||||||
// supply an error code depending on whether we found the proposal acceptable.
|
// but we supply an error code depending on whether we found the proposal
|
||||||
|
// acceptable.
|
||||||
media_type requestedType = format->type;
|
media_type requestedType = format->type;
|
||||||
*format = channel->fPreferredFormat;
|
*format = channel->fPreferredFormat;
|
||||||
if ((requestedType != B_MEDIA_UNKNOWN_TYPE) && (requestedType != B_MEDIA_RAW_AUDIO))
|
if (requestedType != B_MEDIA_UNKNOWN_TYPE
|
||||||
{
|
&& requestedType != B_MEDIA_RAW_AUDIO) {
|
||||||
fprintf(stderr, "MultiAudioNode::FormatProposal returning B_MEDIA_BAD_FORMAT\n");
|
fprintf(stderr, "MultiAudioNode::FormatProposal returning "
|
||||||
|
"B_MEDIA_BAD_FORMAT\n");
|
||||||
return B_MEDIA_BAD_FORMAT;
|
return B_MEDIA_BAD_FORMAT;
|
||||||
}
|
}
|
||||||
else return B_OK; // raw audio or wildcard type, either is okay by us
|
// raw audio or wildcard type, either is okay by us
|
||||||
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -818,17 +863,17 @@ MultiAudioNode::FormatChangeRequested(const media_source& source,
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
MultiAudioNode::GetNextOutput(int32* cookie, media_output* out_output)
|
MultiAudioNode::GetNextOutput(int32* cookie, media_output* _output)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
if ((*cookie < fOutputs.CountItems()) && (*cookie >= 0)) {
|
if (*cookie < fOutputs.CountItems() && *cookie >= 0) {
|
||||||
node_output *channel = (node_output *)fOutputs.ItemAt(*cookie);
|
node_output* channel = (node_output*)fOutputs.ItemAt(*cookie);
|
||||||
*out_output = channel->fOutput;
|
*_output = channel->fOutput;
|
||||||
*cookie += 1;
|
*cookie += 1;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
} else
|
}
|
||||||
return B_BAD_INDEX;
|
return B_BAD_INDEX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -842,37 +887,35 @@ MultiAudioNode::DisposeOutputCookie(int32 cookie)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
MultiAudioNode::SetBufferGroup(const media_source& for_source,
|
MultiAudioNode::SetBufferGroup(const media_source& forSource,
|
||||||
BBufferGroup* newGroup)
|
BBufferGroup* newGroup)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
node_output *channel = _FindOutput(for_source);
|
|
||||||
|
|
||||||
// is this our output?
|
// is this our output?
|
||||||
if (channel == NULL)
|
node_output* channel = _FindOutput(forSource);
|
||||||
{
|
if (channel == NULL) {
|
||||||
fprintf(stderr, "MultiAudioNode::SetBufferGroup returning B_MEDIA_BAD_SOURCE\n");
|
fprintf(stderr, "MultiAudioNode::SetBufferGroup returning "
|
||||||
|
"B_MEDIA_BAD_SOURCE\n");
|
||||||
return B_MEDIA_BAD_SOURCE;
|
return B_MEDIA_BAD_SOURCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Are we being passed the buffer group we're already using?
|
// Are we being passed the buffer group we're already using?
|
||||||
if (newGroup == channel->fBufferGroup) return B_OK;
|
if (newGroup == channel->fBufferGroup)
|
||||||
|
return B_OK;
|
||||||
|
|
||||||
// Ahh, someone wants us to use a different buffer group. At this point we delete
|
// Ahh, someone wants us to use a different buffer group. At this point
|
||||||
// the one we are using and use the specified one instead. If the specified group is
|
// we delete the one we are using and use the specified one instead.
|
||||||
// NULL, we need to recreate one ourselves, and use *that*. Note that if we're
|
// If the specified group is NULL, we need to recreate one ourselves, and
|
||||||
// caching a BBuffer that we requested earlier, we have to Recycle() that buffer
|
// use *that*. Note that if we're caching a BBuffer that we requested
|
||||||
// *before* deleting the buffer group, otherwise we'll deadlock waiting for that
|
// earlier, we have to Recycle() that buffer *before* deleting the buffer
|
||||||
// buffer to be recycled!
|
// group, otherwise we'll deadlock waiting for that buffer to be recycled!
|
||||||
delete channel->fBufferGroup; // waits for all buffers to recycle
|
delete channel->fBufferGroup;
|
||||||
if (newGroup != NULL)
|
// waits for all buffers to recycle
|
||||||
{
|
if (newGroup != NULL) {
|
||||||
// we were given a valid group; just use that one from now on
|
// we were given a valid group; just use that one from now on
|
||||||
channel->fBufferGroup = newGroup;
|
channel->fBufferGroup = newGroup;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
// we were passed a NULL group pointer; that means we construct
|
// we were passed a NULL group pointer; that means we construct
|
||||||
// our own buffer group to use from now on
|
// our own buffer group to use from now on
|
||||||
size_t size = channel->fOutput.format.u.raw_audio.buffer_size;
|
size_t size = channel->fOutput.format.u.raw_audio.buffer_size;
|
||||||
@@ -901,7 +944,8 @@ MultiAudioNode::PrepareToConnect(const media_source& what,
|
|||||||
// is this our output?
|
// is this our output?
|
||||||
node_output* channel = _FindOutput(what);
|
node_output* channel = _FindOutput(what);
|
||||||
if (channel == NULL) {
|
if (channel == NULL) {
|
||||||
fprintf(stderr, "MultiAudioNode::PrepareToConnect returning B_MEDIA_BAD_SOURCE\n");
|
fprintf(stderr, "MultiAudioNode::PrepareToConnect returning "
|
||||||
|
"B_MEDIA_BAD_SOURCE\n");
|
||||||
return B_MEDIA_BAD_SOURCE;
|
return B_MEDIA_BAD_SOURCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -937,11 +981,7 @@ MultiAudioNode::PrepareToConnect(const media_source& what,
|
|||||||
channel->fOutput.format = *format;
|
channel->fOutput.format = *format;
|
||||||
|
|
||||||
*source = channel->fOutput.source;
|
*source = channel->fOutput.source;
|
||||||
#ifdef __HAIKU__
|
|
||||||
strlcpy(name, channel->fOutput.name, B_MEDIA_NAME_LENGTH);
|
strlcpy(name, channel->fOutput.name, B_MEDIA_NAME_LENGTH);
|
||||||
#else
|
|
||||||
strncpy(name, channel->fOutput.name, B_MEDIA_NAME_LENGTH);
|
|
||||||
#endif
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -956,14 +996,15 @@ MultiAudioNode::Connect(status_t error, const media_source& source,
|
|||||||
// is this our output?
|
// is this our output?
|
||||||
node_output* channel = _FindOutput(source);
|
node_output* channel = _FindOutput(source);
|
||||||
if (channel == NULL) {
|
if (channel == NULL) {
|
||||||
fprintf(stderr, "MultiAudioNode::Connect returning (cause : B_MEDIA_BAD_SOURCE)\n");
|
fprintf(stderr, "MultiAudioNode::Connect returning (cause: "
|
||||||
|
"B_MEDIA_BAD_SOURCE)\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If something earlier failed, Connect() might still be called, but with
|
// If something earlier failed, Connect() might still be called, but with
|
||||||
// a non-zero error code. When that happens we simply unreserve the
|
// a non-zero error code. When that happens we simply unreserve the
|
||||||
// connection and do nothing else.
|
// connection and do nothing else.
|
||||||
if (error) {
|
if (error != B_OK) {
|
||||||
channel->fOutput.destination = media_destination::null;
|
channel->fOutput.destination = media_destination::null;
|
||||||
channel->fOutput.format = channel->fPreferredFormat;
|
channel->fOutput.format = channel->fPreferredFormat;
|
||||||
return;
|
return;
|
||||||
@@ -973,15 +1014,12 @@ MultiAudioNode::Connect(status_t error, const media_source& source,
|
|||||||
// format that we agreed on, and report our connection name again.
|
// format that we agreed on, and report our connection name again.
|
||||||
channel->fOutput.destination = destination;
|
channel->fOutput.destination = destination;
|
||||||
channel->fOutput.format = format;
|
channel->fOutput.format = format;
|
||||||
#ifdef __HAIKU__
|
|
||||||
strlcpy(name, channel->fOutput.name, B_MEDIA_NAME_LENGTH);
|
strlcpy(name, channel->fOutput.name, B_MEDIA_NAME_LENGTH);
|
||||||
#else
|
|
||||||
strncpy(name, channel->fOutput.name, B_MEDIA_NAME_LENGTH);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// reset our buffer duration, etc. to avoid later calculations
|
// reset our buffer duration, etc. to avoid later calculations
|
||||||
bigtime_t duration = channel->fOutput.format.u.raw_audio.buffer_size * 10000
|
bigtime_t duration = channel->fOutput.format.u.raw_audio.buffer_size * 10000
|
||||||
/ ((channel->fOutput.format.u.raw_audio.format & media_raw_audio_format::B_AUDIO_SIZE_MASK)
|
/ ((channel->fOutput.format.u.raw_audio.format
|
||||||
|
& media_raw_audio_format::B_AUDIO_SIZE_MASK)
|
||||||
* channel->fOutput.format.u.raw_audio.channel_count)
|
* channel->fOutput.format.u.raw_audio.channel_count)
|
||||||
/ ((int32)(channel->fOutput.format.u.raw_audio.frame_rate / 100));
|
/ ((int32)(channel->fOutput.format.u.raw_audio.frame_rate / 100));
|
||||||
|
|
||||||
@@ -1002,7 +1040,7 @@ MultiAudioNode::Connect(status_t error, const media_source& source,
|
|||||||
// a buffer group (via SetBufferGroup()) prior to this. That can happen,
|
// a buffer group (via SetBufferGroup()) prior to this. That can happen,
|
||||||
// for example, if the consumer calls SetOutputBuffersFor() on us from
|
// for example, if the consumer calls SetOutputBuffersFor() on us from
|
||||||
// within its Connected() method.
|
// within its Connected() method.
|
||||||
if (!channel->fBufferGroup)
|
if (channel->fBufferGroup == NULL)
|
||||||
_AllocateBuffers(*channel);
|
_AllocateBuffers(*channel);
|
||||||
|
|
||||||
_StartOutputThreadIfNeeded();
|
_StartOutputThreadIfNeeded();
|
||||||
@@ -1018,7 +1056,8 @@ MultiAudioNode::Disconnect(const media_source& what,
|
|||||||
// is this our output?
|
// is this our output?
|
||||||
node_output* channel = _FindOutput(what);
|
node_output* channel = _FindOutput(what);
|
||||||
if (channel == NULL) {
|
if (channel == NULL) {
|
||||||
fprintf(stderr, "MultiAudioNode::Disconnect() returning (cause : B_MEDIA_BAD_SOURCE)\n");
|
fprintf(stderr, "MultiAudioNode::Disconnect() returning (cause: "
|
||||||
|
"B_MEDIA_BAD_SOURCE)\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1045,7 +1084,7 @@ MultiAudioNode::LateNoticeReceived(const media_source& what, bigtime_t howMuch,
|
|||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
// is this our output?
|
// is this our output?
|
||||||
node_output *channel = _FindOutput(what);
|
node_output* channel = _FindOutput(what);
|
||||||
if (channel == NULL)
|
if (channel == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -1091,7 +1130,7 @@ MultiAudioNode::EnableOutput(const media_source& what, bool enabled,
|
|||||||
// enable/disable that one. But this node only has one output, so I
|
// enable/disable that one. But this node only has one output, so I
|
||||||
// just make sure the given source matches, then set the enable state
|
// just make sure the given source matches, then set the enable state
|
||||||
// accordingly.
|
// accordingly.
|
||||||
node_output *channel = _FindOutput(what);
|
node_output* channel = _FindOutput(what);
|
||||||
if (channel != NULL)
|
if (channel != NULL)
|
||||||
channel->fOutputEnabled = enabled;
|
channel->fOutputEnabled = enabled;
|
||||||
}
|
}
|
||||||
@@ -1115,7 +1154,6 @@ void
|
|||||||
MultiAudioNode::HandleEvent(const media_timed_event* event, bigtime_t lateness,
|
MultiAudioNode::HandleEvent(const media_timed_event* event, bigtime_t lateness,
|
||||||
bool realTimeEvent)
|
bool realTimeEvent)
|
||||||
{
|
{
|
||||||
//CALLED();
|
|
||||||
switch (event->type) {
|
switch (event->type) {
|
||||||
case BTimedEventQueue::B_START:
|
case BTimedEventQueue::B_START:
|
||||||
_HandleStart(event, lateness, realTimeEvent);
|
_HandleStart(event, lateness, realTimeEvent);
|
||||||
@@ -1140,7 +1178,8 @@ MultiAudioNode::HandleEvent(const media_timed_event* event, bigtime_t lateness,
|
|||||||
_HandleParameter(event, lateness, realTimeEvent);
|
_HandleParameter(event, lateness, realTimeEvent);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr," unknown event type: %" B_PRId32 "\n", event->type);
|
fprintf(stderr," unknown event type: %" B_PRId32 "\n",
|
||||||
|
event->type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1150,12 +1189,11 @@ status_t
|
|||||||
MultiAudioNode::_HandleBuffer(const media_timed_event* event,
|
MultiAudioNode::_HandleBuffer(const media_timed_event* event,
|
||||||
bigtime_t lateness, bool realTimeEvent)
|
bigtime_t lateness, bool realTimeEvent)
|
||||||
{
|
{
|
||||||
//CALLED();
|
|
||||||
BBuffer* buffer = const_cast<BBuffer*>((BBuffer*)event->pointer);
|
BBuffer* buffer = const_cast<BBuffer*>((BBuffer*)event->pointer);
|
||||||
if (buffer == NULL)
|
if (buffer == NULL)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
//PRINT(("buffer->Header()->destination : %i\n", buffer->Header()->destination));
|
//PRINT(("buffer->Header()->destination: %i\n", buffer->Header()->destination));
|
||||||
|
|
||||||
node_input* channel = _FindInput(buffer->Header()->destination);
|
node_input* channel = _FindInput(buffer->Header()->destination);
|
||||||
if (channel == NULL) {
|
if (channel == NULL) {
|
||||||
@@ -1169,15 +1207,15 @@ MultiAudioNode::_HandleBuffer(const media_timed_event* event,
|
|||||||
// lateness doesn't matter in offline mode or in recording mode
|
// lateness doesn't matter in offline mode or in recording mode
|
||||||
//mLateBuffers++;
|
//mLateBuffers++;
|
||||||
NotifyLateProducer(channel->fInput.source, lateness, event->event_time);
|
NotifyLateProducer(channel->fInput.source, lateness, event->event_time);
|
||||||
fprintf(stderr," <- LATE BUFFER : %" B_PRIdBIGTIME "\n", lateness);
|
fprintf(stderr," <- LATE BUFFER: %" B_PRIdBIGTIME "\n", lateness);
|
||||||
buffer->Recycle();
|
buffer->Recycle();
|
||||||
} else {
|
} else {
|
||||||
//WriteBuffer(buffer, *channel);
|
//WriteBuffer(buffer, *channel);
|
||||||
// TODO: This seems like a very fragile mechanism to wait until
|
// TODO: This seems like a very fragile mechanism to wait until
|
||||||
// the previous buffer for this channel has been processed...
|
// the previous buffer for this channel has been processed...
|
||||||
if (channel->fBuffer != NULL) {
|
if (channel->fBuffer != NULL) {
|
||||||
PRINT(("MultiAudioNode::HandleBuffer snoozing recycling channelId : %"
|
PRINT(("MultiAudioNode::HandleBuffer snoozing recycling channelId: "
|
||||||
B_PRIi32 ", how_early:%" B_PRIdBIGTIME "\n",
|
"%" B_PRIi32 ", how_early:%" B_PRIdBIGTIME "\n",
|
||||||
channel->fChannelId, lateness));
|
channel->fChannelId, lateness));
|
||||||
//channel->fBuffer->Recycle();
|
//channel->fBuffer->Recycle();
|
||||||
snooze(100);
|
snooze(100);
|
||||||
@@ -1186,7 +1224,7 @@ MultiAudioNode::_HandleBuffer(const media_timed_event* event,
|
|||||||
else
|
else
|
||||||
channel->fBuffer = buffer;
|
channel->fBuffer = buffer;
|
||||||
} else {
|
} else {
|
||||||
//PRINT(("MultiAudioNode::HandleBuffer writing channelId : %li, how_early:%Ld\n", channel->fChannelId, howEarly));
|
//PRINT(("MultiAudioNode::HandleBuffer writing channelId: %li, how_early:%Ld\n", channel->fChannelId, howEarly));
|
||||||
channel->fBuffer = buffer;
|
channel->fBuffer = buffer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1198,9 +1236,8 @@ status_t
|
|||||||
MultiAudioNode::_HandleDataStatus(const media_timed_event* event,
|
MultiAudioNode::_HandleDataStatus(const media_timed_event* event,
|
||||||
bigtime_t lateness, bool realTimeEvent)
|
bigtime_t lateness, bool realTimeEvent)
|
||||||
{
|
{
|
||||||
//CALLED();
|
PRINT(("MultiAudioNode::HandleDataStatus status:%" B_PRIi32 ", lateness:%"
|
||||||
PRINT(("MultiAudioNode::HandleDataStatus status:%" B_PRIi32
|
B_PRIiBIGTIME "\n", event->data, lateness));
|
||||||
", lateness:%" B_PRIiBIGTIME "\n", event->data, lateness));
|
|
||||||
switch (event->data) {
|
switch (event->data) {
|
||||||
case B_DATA_NOT_AVAILABLE:
|
case B_DATA_NOT_AVAILABLE:
|
||||||
break;
|
break;
|
||||||
@@ -1216,7 +1253,7 @@ MultiAudioNode::_HandleDataStatus(const media_timed_event* event,
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
MultiAudioNode::_HandleStart(const media_timed_event *event, bigtime_t lateness,
|
MultiAudioNode::_HandleStart(const media_timed_event* event, bigtime_t lateness,
|
||||||
bool realTimeEvent)
|
bool realTimeEvent)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
@@ -1337,7 +1374,7 @@ MultiAudioNode::GetParameterValue(int32 id, bigtime_t* lastChange, void* value,
|
|||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
PRINT(("id : %" B_PRIi32 "\n", id));
|
PRINT(("id: %" B_PRIi32 "\n", id));
|
||||||
BParameter* parameter = NULL;
|
BParameter* parameter = NULL;
|
||||||
for (int32 i = 0; i < fWeb->CountParameters(); i++) {
|
for (int32 i = 0; i < fWeb->CountParameters(); i++) {
|
||||||
parameter = fWeb->ParameterAt(i);
|
parameter = fWeb->ParameterAt(i);
|
||||||
@@ -1387,7 +1424,7 @@ MultiAudioNode::GetParameterValue(int32 id, bigtime_t* lastChange, void* value,
|
|||||||
info.item_count = 2;
|
info.item_count = 2;
|
||||||
values[1].id = controls[id + 1 - 100].id;
|
values[1].id = controls[id + 1 - 100].id;
|
||||||
}
|
}
|
||||||
} else if(parameter->Type() == BParameter::B_DISCRETE_PARAMETER) {
|
} else if (parameter->Type() == BParameter::B_DISCRETE_PARAMETER) {
|
||||||
info.item_count = 1;
|
info.item_count = 1;
|
||||||
values[0].id = control_id;
|
values[0].id = control_id;
|
||||||
}
|
}
|
||||||
@@ -1408,7 +1445,7 @@ MultiAudioNode::GetParameterValue(int32 id, bigtime_t* lastChange, void* value,
|
|||||||
|
|
||||||
for (uint32 i = 0; i < *size / sizeof(float); i++) {
|
for (uint32 i = 0; i < *size / sizeof(float); i++) {
|
||||||
PRINT(("GetParameterValue B_CONTINUOUS_PARAMETER value[%"
|
PRINT(("GetParameterValue B_CONTINUOUS_PARAMETER value[%"
|
||||||
B_PRIi32 "] : %f\n", i, ((float*)value)[i]));
|
B_PRIi32 "]: %f\n", i, ((float*)value)[i]));
|
||||||
}
|
}
|
||||||
} else if (parameter->Type() == BParameter::B_DISCRETE_PARAMETER) {
|
} else if (parameter->Type() == BParameter::B_DISCRETE_PARAMETER) {
|
||||||
BDiscreteParameter* discrete = (BDiscreteParameter*)parameter;
|
BDiscreteParameter* discrete = (BDiscreteParameter*)parameter;
|
||||||
@@ -1420,8 +1457,8 @@ MultiAudioNode::GetParameterValue(int32 id, bigtime_t* lastChange, void* value,
|
|||||||
*size = sizeof(int32);
|
*size = sizeof(int32);
|
||||||
|
|
||||||
for (uint32 i = 0; i < *size / sizeof(int32); i++) {
|
for (uint32 i = 0; i < *size / sizeof(int32); i++) {
|
||||||
PRINT(("GetParameterValue B_DISCRETE_PARAMETER value[%" B_PRIi32
|
PRINT(("GetParameterValue B_DISCRETE_PARAMETER value[%"
|
||||||
"] : %" B_PRIi32 "\n", i, ((int32*)value)[i]));
|
B_PRIi32 "]: %" B_PRIi32 "\n", i, ((int32*)value)[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1435,8 +1472,8 @@ MultiAudioNode::SetParameterValue(int32 id, bigtime_t performanceTime,
|
|||||||
const void* value, size_t size)
|
const void* value, size_t size)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
PRINT(("id : %" B_PRIi32 ", performance_time : %" B_PRIdBIGTIME
|
PRINT(("id: %" B_PRIi32 ", performance_time: %" B_PRIdBIGTIME
|
||||||
", size : %" B_PRIuSIZE "\n", id, performanceTime, size));
|
", size: %" B_PRIuSIZE "\n", id, performanceTime, size));
|
||||||
|
|
||||||
BParameter* parameter = NULL;
|
BParameter* parameter = NULL;
|
||||||
for (int32 i = 0; i < fWeb->CountParameters(); i++) {
|
for (int32 i = 0; i < fWeb->CountParameters(); i++) {
|
||||||
@@ -1450,7 +1487,8 @@ MultiAudioNode::SetParameterValue(int32 id, bigtime_t performanceTime,
|
|||||||
|
|
||||||
if (id == PARAMETER_ID_OUTPUT_FREQUENCY
|
if (id == PARAMETER_ID_OUTPUT_FREQUENCY
|
||||||
|| (id == PARAMETER_ID_INPUT_FREQUENCY
|
|| (id == PARAMETER_ID_INPUT_FREQUENCY
|
||||||
&& (fDevice->Description().output_rates & B_SR_SAME_AS_INPUT))) {
|
&& (fDevice->Description().output_rates
|
||||||
|
& B_SR_SAME_AS_INPUT) != 0)) {
|
||||||
uint32 rate;
|
uint32 rate;
|
||||||
if (size < sizeof(rate))
|
if (size < sizeof(rate))
|
||||||
return;
|
return;
|
||||||
@@ -1461,8 +1499,7 @@ MultiAudioNode::SetParameterValue(int32 id, bigtime_t performanceTime,
|
|||||||
|
|
||||||
// create a cookie RequestCompleted() can get the old frame rate from,
|
// create a cookie RequestCompleted() can get the old frame rate from,
|
||||||
// if anything goes wrong
|
// if anything goes wrong
|
||||||
FrameRateChangeCookie* cookie
|
FrameRateChangeCookie* cookie = new(std::nothrow) FrameRateChangeCookie;
|
||||||
= new(std::nothrow) FrameRateChangeCookie;
|
|
||||||
if (cookie == NULL)
|
if (cookie == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -1514,8 +1551,7 @@ MultiAudioNode::SetParameterValue(int32 id, bigtime_t performanceTime,
|
|||||||
|
|
||||||
// create a cookie RequestCompleted() can get the old frame rate from,
|
// create a cookie RequestCompleted() can get the old frame rate from,
|
||||||
// if anything goes wrong
|
// if anything goes wrong
|
||||||
FrameRateChangeCookie* cookie
|
FrameRateChangeCookie* cookie = new(std::nothrow) FrameRateChangeCookie;
|
||||||
= new(std::nothrow) FrameRateChangeCookie;
|
|
||||||
if (cookie == NULL)
|
if (cookie == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -1564,7 +1600,7 @@ MultiAudioNode::SetParameterValue(int32 id, bigtime_t performanceTime,
|
|||||||
if (parameter->Type() == BParameter::B_CONTINUOUS_PARAMETER) {
|
if (parameter->Type() == BParameter::B_CONTINUOUS_PARAMETER) {
|
||||||
for (uint32 i = 0; i < size / sizeof(float); i++) {
|
for (uint32 i = 0; i < size / sizeof(float); i++) {
|
||||||
PRINT(("SetParameterValue B_CONTINUOUS_PARAMETER value[%" B_PRIi32
|
PRINT(("SetParameterValue B_CONTINUOUS_PARAMETER value[%" B_PRIi32
|
||||||
"] : %f\n", i, ((float*)value)[i]));
|
"]: %f\n", i, ((float*)value)[i]));
|
||||||
}
|
}
|
||||||
info.item_count = 1;
|
info.item_count = 1;
|
||||||
values[0].id = control_id;
|
values[0].id = control_id;
|
||||||
@@ -1578,7 +1614,7 @@ MultiAudioNode::SetParameterValue(int32 id, bigtime_t performanceTime,
|
|||||||
} else if (parameter->Type() == BParameter::B_DISCRETE_PARAMETER) {
|
} else if (parameter->Type() == BParameter::B_DISCRETE_PARAMETER) {
|
||||||
for (uint32 i = 0; i < size / sizeof(int32); i++) {
|
for (uint32 i = 0; i < size / sizeof(int32); i++) {
|
||||||
PRINT(("SetParameterValue B_DISCRETE_PARAMETER value[%" B_PRIi32
|
PRINT(("SetParameterValue B_DISCRETE_PARAMETER value[%" B_PRIi32
|
||||||
"] : %" B_PRIi32 "\n", i, ((int32*)value)[i]));
|
"]: %" B_PRIi32 "\n", i, ((int32*)value)[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
BDiscreteParameter* discrete = (BDiscreteParameter*)parameter;
|
BDiscreteParameter* discrete = (BDiscreteParameter*)parameter;
|
||||||
@@ -1605,18 +1641,19 @@ BParameterWeb*
|
|||||||
MultiAudioNode::MakeParameterWeb()
|
MultiAudioNode::MakeParameterWeb()
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
BParameterWeb* web = new BParameterWeb;
|
BParameterWeb* web = new BParameterWeb();
|
||||||
|
|
||||||
PRINT(("MixControlInfo().control_count : %" B_PRIi32 "\n",
|
PRINT(("MixControlInfo().control_count: %" B_PRIi32 "\n",
|
||||||
fDevice->MixControlInfo().control_count));
|
fDevice->MixControlInfo().control_count));
|
||||||
|
|
||||||
BParameterGroup* generalGroup = web->MakeGroup(B_TRANSLATE("General"));
|
BParameterGroup* generalGroup = web->MakeGroup(B_TRANSLATE("General"));
|
||||||
|
|
||||||
const multi_description& description = fDevice->Description();
|
const multi_description& description = fDevice->Description();
|
||||||
|
|
||||||
if (description.output_rates & B_SR_SAME_AS_INPUT) {
|
if ((description.output_rates & B_SR_SAME_AS_INPUT) != 0) {
|
||||||
_CreateFrequencyParameterGroup(generalGroup, B_TRANSLATE("Input & Output"),
|
_CreateFrequencyParameterGroup(generalGroup,
|
||||||
PARAMETER_ID_INPUT_FREQUENCY, description.input_rates);
|
B_TRANSLATE("Input & Output"), PARAMETER_ID_INPUT_FREQUENCY,
|
||||||
|
description.input_rates);
|
||||||
} else {
|
} else {
|
||||||
_CreateFrequencyParameterGroup(generalGroup, B_TRANSLATE("Input"),
|
_CreateFrequencyParameterGroup(generalGroup, B_TRANSLATE("Input"),
|
||||||
PARAMETER_ID_INPUT_FREQUENCY, description.input_rates);
|
PARAMETER_ID_INPUT_FREQUENCY, description.input_rates);
|
||||||
@@ -1627,7 +1664,8 @@ MultiAudioNode::MakeParameterWeb()
|
|||||||
multi_mix_control* controls = fDevice->MixControlInfo().controls;
|
multi_mix_control* controls = fDevice->MixControlInfo().controls;
|
||||||
|
|
||||||
for (int i = 0; i < fDevice->MixControlInfo().control_count; i++) {
|
for (int i = 0; i < fDevice->MixControlInfo().control_count; i++) {
|
||||||
if (controls[i].flags & B_MULTI_MIX_GROUP && controls[i].parent == 0) {
|
if ((controls[i].flags & B_MULTI_MIX_GROUP) != 0
|
||||||
|
&& controls[i].parent == 0) {
|
||||||
PRINT(("NEW_GROUP\n"));
|
PRINT(("NEW_GROUP\n"));
|
||||||
BParameterGroup* child = web->MakeGroup(
|
BParameterGroup* child = web->MakeGroup(
|
||||||
_GetControlName(controls[i]));
|
_GetControlName(controls[i]));
|
||||||
@@ -1692,15 +1730,15 @@ MultiAudioNode::_ProcessGroup(BParameterGroup* group, int32 index,
|
|||||||
|
|
||||||
if (i + 1 < fDevice->MixControlInfo().control_count
|
if (i + 1 < fDevice->MixControlInfo().control_count
|
||||||
&& controls[i + 1].master == controls[i].id
|
&& controls[i + 1].master == controls[i].id
|
||||||
&& controls[i + 1].flags & B_MULTI_MIX_GAIN) {
|
&& (controls[i + 1].flags & B_MULTI_MIX_GAIN) != 0) {
|
||||||
group->ParameterAt(numParameters)->SetChannelCount(
|
group->ParameterAt(numParameters)->SetChannelCount(
|
||||||
group->ParameterAt(numParameters)->CountChannels() + 1);
|
group->ParameterAt(numParameters)->CountChannels() + 1);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINT(("num parameters : %" B_PRId32 "\n", numParameters));
|
PRINT(("num parameters: %" B_PRId32 "\n", numParameters));
|
||||||
if (numParameters > 0) {
|
if (numParameters > 0) {
|
||||||
(group->ParameterAt(numParameters - 1))->AddOutput(
|
group->ParameterAt(numParameters - 1)->AddOutput(
|
||||||
group->ParameterAt(numParameters));
|
group->ParameterAt(numParameters));
|
||||||
numParameters++;
|
numParameters++;
|
||||||
}
|
}
|
||||||
@@ -1714,7 +1752,7 @@ MultiAudioNode::_ProcessGroup(BParameterGroup* group, int32 index,
|
|||||||
B_MEDIA_RAW_AUDIO, name, B_ENABLE);
|
B_MEDIA_RAW_AUDIO, name, B_ENABLE);
|
||||||
}
|
}
|
||||||
if (numParameters > 0) {
|
if (numParameters > 0) {
|
||||||
(group->ParameterAt(numParameters - 1))->AddOutput(
|
group->ParameterAt(numParameters - 1)->AddOutput(
|
||||||
group->ParameterAt(numParameters));
|
group->ParameterAt(numParameters));
|
||||||
numParameters++;
|
numParameters++;
|
||||||
}
|
}
|
||||||
@@ -1735,7 +1773,7 @@ MultiAudioNode::_ProcessMux(BDiscreteParameter* parameter, int32 index)
|
|||||||
if (controls[i].parent != parent->id)
|
if (controls[i].parent != parent->id)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (controls[i].flags & B_MULTI_MIX_MUX_VALUE) {
|
if ((controls[i].flags & B_MULTI_MIX_MUX_VALUE) != 0) {
|
||||||
PRINT(("NEW_MUX_VALUE\n"));
|
PRINT(("NEW_MUX_VALUE\n"));
|
||||||
parameter->AddItem(itemIndex, _GetControlName(controls[i]));
|
parameter->AddItem(itemIndex, _GetControlName(controls[i]));
|
||||||
itemIndex++;
|
itemIndex++;
|
||||||
@@ -1750,7 +1788,8 @@ MultiAudioNode::_CreateFrequencyParameterGroup(BParameterGroup* parentGroup,
|
|||||||
{
|
{
|
||||||
BParameterGroup* group = parentGroup->MakeGroup(name);
|
BParameterGroup* group = parentGroup->MakeGroup(name);
|
||||||
BDiscreteParameter* frequencyParam = group->MakeDiscreteParameter(
|
BDiscreteParameter* frequencyParam = group->MakeDiscreteParameter(
|
||||||
parameterID, B_MEDIA_NO_TYPE, BString(name) << B_TRANSLATE(" frequency:"),
|
parameterID, B_MEDIA_NO_TYPE,
|
||||||
|
BString(name) << B_TRANSLATE(" frequency:"),
|
||||||
B_GENERIC);
|
B_GENERIC);
|
||||||
|
|
||||||
for (int32 i = 0; kSampleRateInfos[i].name != NULL; i++) {
|
for (int32 i = 0; kSampleRateInfos[i].name != NULL; i++) {
|
||||||
@@ -1796,9 +1835,9 @@ MultiAudioNode::_OutputThread()
|
|||||||
fDevice->BufferExchange(&bufferInfo);
|
fDevice->BufferExchange(&bufferInfo);
|
||||||
|
|
||||||
//PRINT(("MultiAudioNode::RunThread: buffer exchanged\n"));
|
//PRINT(("MultiAudioNode::RunThread: buffer exchanged\n"));
|
||||||
//PRINT(("MultiAudioNode::RunThread: played_real_time : %Ld\n", bufferInfo.played_real_time));
|
//PRINT(("MultiAudioNode::RunThread: played_real_time: %Ld\n", bufferInfo.played_real_time));
|
||||||
//PRINT(("MultiAudioNode::RunThread: played_frames_count : %Ld\n", bufferInfo.played_frames_count));
|
//PRINT(("MultiAudioNode::RunThread: played_frames_count: %Ld\n", bufferInfo.played_frames_count));
|
||||||
//PRINT(("MultiAudioNode::RunThread: buffer_cycle : %li\n", bufferInfo.playback_buffer_cycle));
|
//PRINT(("MultiAudioNode::RunThread: buffer_cycle: %li\n", bufferInfo.playback_buffer_cycle));
|
||||||
|
|
||||||
for (int32 i = 0; i < fInputs.CountItems(); i++) {
|
for (int32 i = 0; i < fInputs.CountItems(); i++) {
|
||||||
node_input* input = (node_input*)fInputs.ItemAt(i);
|
node_input* input = (node_input*)fInputs.ItemAt(i);
|
||||||
@@ -1811,7 +1850,7 @@ MultiAudioNode::_OutputThread()
|
|||||||
|| fDevice->BufferList().return_playback_buffers == 1)
|
|| fDevice->BufferList().return_playback_buffers == 1)
|
||||||
&& (input->fInput.source != media_source::null
|
&& (input->fInput.source != media_source::null
|
||||||
|| input->fChannelId == 0)) {
|
|| input->fChannelId == 0)) {
|
||||||
//PRINT(("playback_buffer_cycle ok input : %li %ld\n", i, bufferInfo.playback_buffer_cycle));
|
//PRINT(("playback_buffer_cycle ok input: %li %ld\n", i, bufferInfo.playback_buffer_cycle));
|
||||||
|
|
||||||
input->fBufferCycle = (bufferInfo.playback_buffer_cycle - 1
|
input->fBufferCycle = (bufferInfo.playback_buffer_cycle - 1
|
||||||
+ fDevice->BufferList().return_playback_buffers)
|
+ fDevice->BufferList().return_playback_buffers)
|
||||||
@@ -1840,15 +1879,15 @@ MultiAudioNode::_OutputThread()
|
|||||||
// mark buffer free
|
// mark buffer free
|
||||||
release_sem(fBufferFreeSem);
|
release_sem(fBufferFreeSem);
|
||||||
} else {
|
} else {
|
||||||
//PRINT(("playback_buffer_cycle non ok input : %i\n", i));
|
//PRINT(("playback_buffer_cycle non ok input: %i\n", i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINT(("MultiAudioNode::RunThread: recorded_real_time : %" B_PRIdBIGTIME
|
PRINT(("MultiAudioNode::RunThread: recorded_real_time: %" B_PRIdBIGTIME
|
||||||
"\n", bufferInfo.recorded_real_time));
|
"\n", bufferInfo.recorded_real_time));
|
||||||
PRINT(("MultiAudioNode::RunThread: recorded_frames_count : %"
|
PRINT(("MultiAudioNode::RunThread: recorded_frames_count: %"
|
||||||
B_PRId64 "\n", bufferInfo.recorded_frames_count));
|
B_PRId64 "\n", bufferInfo.recorded_frames_count));
|
||||||
PRINT(("MultiAudioNode::RunThread: record_buffer_cycle : %" B_PRIi32
|
PRINT(("MultiAudioNode::RunThread: record_buffer_cycle: %" B_PRIi32
|
||||||
"\n", bufferInfo.record_buffer_cycle));
|
"\n", bufferInfo.record_buffer_cycle));
|
||||||
|
|
||||||
for (int32 i = 0; i < fOutputs.CountItems(); i++) {
|
for (int32 i = 0; i < fOutputs.CountItems(); i++) {
|
||||||
@@ -1878,14 +1917,15 @@ MultiAudioNode::_OutputThread()
|
|||||||
err = SendBuffer(buffer, output->fOutput.source,
|
err = SendBuffer(buffer, output->fOutput.source,
|
||||||
output->fOutput.destination);
|
output->fOutput.destination);
|
||||||
}
|
}
|
||||||
if (err) {
|
if (err != B_OK) {
|
||||||
buffer->Recycle();
|
buffer->Recycle();
|
||||||
} else {
|
} else {
|
||||||
// track how much media we've delivered so far
|
// track how much media we've delivered so far
|
||||||
size_t numSamples
|
size_t numSamples
|
||||||
= output->fOutput.format.u.raw_audio.buffer_size
|
= output->fOutput.format.u.raw_audio.buffer_size
|
||||||
/ (output->fOutput.format.u.raw_audio.format
|
/ (output->fOutput.format.u.raw_audio.format
|
||||||
& media_raw_audio_format::B_AUDIO_SIZE_MASK);
|
& media_raw_audio_format
|
||||||
|
::B_AUDIO_SIZE_MASK);
|
||||||
output->fSamplesSent += numSamples;
|
output->fSamplesSent += numSamples;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2115,15 +2155,15 @@ MultiAudioNode::_UpdateTimeSource(multi_buffer_info& info,
|
|||||||
|
|
||||||
|
|
||||||
BBuffer*
|
BBuffer*
|
||||||
MultiAudioNode::_FillNextBuffer(multi_buffer_info &info, node_output &output)
|
MultiAudioNode::_FillNextBuffer(multi_buffer_info& info, node_output& output)
|
||||||
{
|
{
|
||||||
//CALLED();
|
//CALLED();
|
||||||
// get a buffer from our buffer group
|
// get a buffer from our buffer group
|
||||||
//PRINT(("buffer size : %i, buffer duration : %i\n", fOutput.format.u.raw_audio.buffer_size, BufferDuration()));
|
//PRINT(("buffer size: %i, buffer duration: %i\n", fOutput.format.u.raw_audio.buffer_size, BufferDuration()));
|
||||||
//PRINT(("MBI.record_buffer_cycle : %i\n", MBI.record_buffer_cycle));
|
//PRINT(("MBI.record_buffer_cycle: %i\n", MBI.record_buffer_cycle));
|
||||||
//PRINT(("MBI.recorded_real_time : %i\n", MBI.recorded_real_time));
|
//PRINT(("MBI.recorded_real_time: %i\n", MBI.recorded_real_time));
|
||||||
//PRINT(("MBI.recorded_frames_count : %i\n", MBI.recorded_frames_count));
|
//PRINT(("MBI.recorded_frames_count: %i\n", MBI.recorded_frames_count));
|
||||||
if (!output.fBufferGroup)
|
if (output.fBufferGroup == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
BBuffer* buffer = output.fBufferGroup->RequestBuffer(
|
BBuffer* buffer = output.fBufferGroup->RequestBuffer(
|
||||||
@@ -2182,28 +2222,24 @@ status_t
|
|||||||
MultiAudioNode::GetConfigurationFor(BMessage* message)
|
MultiAudioNode::GetConfigurationFor(BMessage* message)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
BParameter *parameter = NULL;
|
|
||||||
void *buffer;
|
|
||||||
size_t bufferSize = 128;
|
|
||||||
bigtime_t lastChange;
|
|
||||||
status_t err;
|
|
||||||
|
|
||||||
if (message == NULL)
|
if (message == NULL)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
buffer = malloc(bufferSize);
|
size_t bufferSize = 128;
|
||||||
|
void* buffer = malloc(bufferSize);
|
||||||
if (buffer == NULL)
|
if (buffer == NULL)
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
for (int32 i = 0; i < fWeb->CountParameters(); i++) {
|
for (int32 i = 0; i < fWeb->CountParameters(); i++) {
|
||||||
parameter = fWeb->ParameterAt(i);
|
BParameter* parameter = fWeb->ParameterAt(i);
|
||||||
if (parameter->Type() != BParameter::B_CONTINUOUS_PARAMETER
|
if (parameter->Type() != BParameter::B_CONTINUOUS_PARAMETER
|
||||||
&& parameter->Type() != BParameter::B_DISCRETE_PARAMETER)
|
&& parameter->Type() != BParameter::B_DISCRETE_PARAMETER)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
PRINT(("getting parameter %" B_PRIi32 "\n", parameter->ID()));
|
PRINT(("getting parameter %" B_PRIi32 "\n", parameter->ID()));
|
||||||
size_t size = bufferSize;
|
size_t size = bufferSize;
|
||||||
|
bigtime_t lastChange;
|
||||||
|
status_t err;
|
||||||
while ((err = GetParameterValue(parameter->ID(), &lastChange, buffer,
|
while ((err = GetParameterValue(parameter->ID(), &lastChange, buffer,
|
||||||
&size)) == B_NO_MEMORY && bufferSize < 128 * 1024) {
|
&size)) == B_NO_MEMORY && bufferSize < 128 * 1024) {
|
||||||
bufferSize += 128;
|
bufferSize += 128;
|
||||||
@@ -2217,7 +2253,7 @@ MultiAudioNode::GetConfigurationFor(BMessage* message)
|
|||||||
message->AddInt32("parameterID", parameter->ID());
|
message->AddInt32("parameterID", parameter->ID());
|
||||||
message->AddData("parameterData", B_RAW_TYPE, buffer, size, false);
|
message->AddData("parameterData", B_RAW_TYPE, buffer, size, false);
|
||||||
} else {
|
} else {
|
||||||
PRINT(("parameter err : %s\n", strerror(err)));
|
PRINT(("parameter err: %s\n", strerror(err)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,207 +32,235 @@ class node_output;
|
|||||||
class MultiAudioNode : public BBufferConsumer, public BBufferProducer,
|
class MultiAudioNode : public BBufferConsumer, public BBufferProducer,
|
||||||
public BTimeSource, public BMediaEventLooper, public BControllable {
|
public BTimeSource, public BMediaEventLooper, public BControllable {
|
||||||
protected:
|
protected:
|
||||||
virtual ~MultiAudioNode();
|
virtual ~MultiAudioNode();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MultiAudioNode(BMediaAddOn* addon, const char* name,
|
MultiAudioNode(BMediaAddOn* addon,
|
||||||
MultiAudioDevice* device, int32 internalID,
|
const char* name, MultiAudioDevice* device,
|
||||||
BMessage* config);
|
int32 internalID, BMessage* config);
|
||||||
|
|
||||||
virtual status_t InitCheck() const;
|
virtual status_t InitCheck() const;
|
||||||
|
|
||||||
static void GetFlavor(flavor_info* info, int32 id);
|
static void GetFlavor(flavor_info* info, int32 id);
|
||||||
static void GetFormat(media_format* outFormat);
|
static void GetFormat(media_format* outFormat);
|
||||||
|
|
||||||
status_t GetConfigurationFor(BMessage* message);
|
status_t GetConfigurationFor(BMessage* message);
|
||||||
|
|
||||||
// BMediaNode methods
|
// BMediaNode methods
|
||||||
virtual BMediaAddOn* AddOn(int32* internalID) const;
|
virtual BMediaAddOn* AddOn(int32* internalID) const;
|
||||||
virtual status_t HandleMessage(int32 message, const void* data,
|
virtual status_t HandleMessage(int32 message, const void* data,
|
||||||
size_t size);
|
size_t size);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void Preroll();
|
virtual void Preroll();
|
||||||
virtual void NodeRegistered();
|
virtual void NodeRegistered();
|
||||||
virtual status_t RequestCompleted(const media_request_info& info);
|
virtual status_t RequestCompleted(
|
||||||
virtual void SetTimeSource(BTimeSource* timeSource);
|
const media_request_info& info);
|
||||||
|
virtual void SetTimeSource(BTimeSource* timeSource);
|
||||||
|
|
||||||
// BBufferConsumer methods
|
// BBufferConsumer methods
|
||||||
|
|
||||||
virtual status_t AcceptFormat(const media_destination& dest,
|
virtual status_t AcceptFormat(const media_destination& dest,
|
||||||
media_format* format);
|
media_format* format);
|
||||||
virtual status_t GetNextInput(int32* cookie, media_input* input);
|
virtual status_t GetNextInput(int32* cookie, media_input* input);
|
||||||
virtual void DisposeInputCookie(int32 cookie);
|
virtual void DisposeInputCookie(int32 cookie);
|
||||||
virtual void BufferReceived(BBuffer* buffer);
|
virtual void BufferReceived(BBuffer* buffer);
|
||||||
virtual void ProducerDataStatus(const media_destination& forWhom,
|
virtual void ProducerDataStatus(
|
||||||
int32 status, bigtime_t atPerformanceTime);
|
const media_destination& forWhom,
|
||||||
virtual status_t GetLatencyFor(const media_destination& forWhom,
|
int32 status, bigtime_t atPerformanceTime);
|
||||||
bigtime_t* latency, media_node_id* timeSource);
|
virtual status_t GetLatencyFor(const media_destination& forWhom,
|
||||||
virtual status_t Connected(const media_source& producer,
|
bigtime_t* latency,
|
||||||
const media_destination& where,
|
media_node_id* timeSource);
|
||||||
const media_format& withFormat,
|
virtual status_t Connected(const media_source& producer,
|
||||||
media_input* input);
|
const media_destination& where,
|
||||||
virtual void Disconnected(const media_source& producer,
|
const media_format& withFormat,
|
||||||
const media_destination& where);
|
media_input* input);
|
||||||
virtual status_t FormatChanged(const media_source& producer,
|
virtual void Disconnected(const media_source& producer,
|
||||||
const media_destination& consumer,
|
const media_destination& where);
|
||||||
int32 changeTag, const media_format& format);
|
virtual status_t FormatChanged(const media_source& producer,
|
||||||
|
const media_destination& consumer,
|
||||||
|
int32 changeTag,
|
||||||
|
const media_format& format);
|
||||||
|
|
||||||
virtual status_t SeekTagRequested(
|
virtual status_t SeekTagRequested(
|
||||||
const media_destination& destination,
|
const media_destination& destination,
|
||||||
bigtime_t targetTime, uint32 flags,
|
bigtime_t targetTime, uint32 flags,
|
||||||
media_seek_tag* _seekTag, bigtime_t* _taggedTime,
|
media_seek_tag* _seekTag,
|
||||||
uint32* _flags);
|
bigtime_t* _taggedTime, uint32* _flags);
|
||||||
|
|
||||||
// BBufferProducer methods
|
// BBufferProducer methods
|
||||||
|
|
||||||
virtual status_t FormatSuggestionRequested(media_type type,
|
virtual status_t FormatSuggestionRequested(media_type type,
|
||||||
int32 quality, media_format* format);
|
int32 quality, media_format* format);
|
||||||
|
|
||||||
virtual status_t FormatProposal(const media_source& output,
|
virtual status_t FormatProposal(const media_source& output,
|
||||||
media_format* format);
|
media_format* format);
|
||||||
|
|
||||||
virtual status_t FormatChangeRequested(const media_source& source,
|
virtual status_t FormatChangeRequested(
|
||||||
const media_destination& destination,
|
const media_source& source,
|
||||||
media_format* io_format, int32* _deprecated);
|
const media_destination& destination,
|
||||||
virtual status_t GetNextOutput(int32* cookie,
|
media_format* ioFormat,
|
||||||
media_output* out_output);
|
int32* _deprecated);
|
||||||
virtual status_t DisposeOutputCookie(int32 cookie);
|
virtual status_t GetNextOutput(int32* cookie,
|
||||||
|
media_output* _output);
|
||||||
|
virtual status_t DisposeOutputCookie(int32 cookie);
|
||||||
|
|
||||||
virtual status_t SetBufferGroup(const media_source& for_source,
|
virtual status_t SetBufferGroup(const media_source& forSource,
|
||||||
BBufferGroup* group);
|
BBufferGroup* group);
|
||||||
|
|
||||||
virtual status_t PrepareToConnect(const media_source& what,
|
virtual status_t PrepareToConnect(const media_source& what,
|
||||||
const media_destination& where,
|
const media_destination& where,
|
||||||
media_format* format, media_source* source,
|
media_format* format, media_source* source,
|
||||||
char* name);
|
char* name);
|
||||||
|
|
||||||
virtual void Connect(status_t error, const media_source& source,
|
virtual void Connect(status_t error,
|
||||||
const media_destination& destination,
|
const media_source& source,
|
||||||
const media_format& format, char* name);
|
const media_destination& destination,
|
||||||
virtual void Disconnect(const media_source& what,
|
const media_format& format, char* name);
|
||||||
const media_destination& where);
|
virtual void Disconnect(const media_source& what,
|
||||||
|
const media_destination& where);
|
||||||
|
|
||||||
virtual void LateNoticeReceived(const media_source& what,
|
virtual void LateNoticeReceived(const media_source& what,
|
||||||
bigtime_t howMuch, bigtime_t performanceTime);
|
bigtime_t howMuch,
|
||||||
|
bigtime_t performanceTime);
|
||||||
|
|
||||||
virtual void EnableOutput(const media_source& what, bool enabled,
|
virtual void EnableOutput(const media_source& what,
|
||||||
int32* _deprecated);
|
bool enabled, int32* _deprecated);
|
||||||
virtual void AdditionalBufferRequested(const media_source& source,
|
virtual void AdditionalBufferRequested(
|
||||||
media_buffer_id previousBuffer,
|
const media_source& source,
|
||||||
bigtime_t previousTime,
|
media_buffer_id previousBuffer,
|
||||||
const media_seek_tag* previousTag);
|
bigtime_t previousTime,
|
||||||
|
const media_seek_tag* previousTag);
|
||||||
|
|
||||||
// BMediaEventLooper methods
|
// BMediaEventLooper methods
|
||||||
virtual void HandleEvent(const media_timed_event* event,
|
virtual void HandleEvent(const media_timed_event* event,
|
||||||
bigtime_t lateness, bool realTimeEvent = false);
|
bigtime_t lateness,
|
||||||
|
bool realTimeEvent = false);
|
||||||
|
|
||||||
// BTimeSource methods
|
// BTimeSource methods
|
||||||
virtual void SetRunMode(run_mode mode);
|
virtual void SetRunMode(run_mode mode);
|
||||||
virtual status_t TimeSourceOp(const time_source_op_info& op,
|
virtual status_t TimeSourceOp(const time_source_op_info& op,
|
||||||
void *_reserved);
|
void *_reserved);
|
||||||
|
|
||||||
// BControllable methods
|
// BControllable methods
|
||||||
virtual status_t GetParameterValue(int32 id, bigtime_t* lastChange,
|
virtual status_t GetParameterValue(int32 id,
|
||||||
void* value, size_t* size);
|
bigtime_t* lastChange, void* value,
|
||||||
virtual void SetParameterValue(int32 id, bigtime_t when,
|
size_t* size);
|
||||||
const void* value, size_t size);
|
virtual void SetParameterValue(int32 id, bigtime_t when,
|
||||||
virtual BParameterWeb* MakeParameterWeb();
|
const void* value, size_t size);
|
||||||
|
virtual BParameterWeb* MakeParameterWeb();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// private unimplemented
|
// private unimplemented
|
||||||
MultiAudioNode(const MultiAudioNode& clone);
|
MultiAudioNode(const MultiAudioNode& clone);
|
||||||
MultiAudioNode& operator=(const MultiAudioNode& clone);
|
MultiAudioNode& operator=(const MultiAudioNode& clone);
|
||||||
|
|
||||||
status_t _HandleStart(const media_timed_event* event,
|
status_t _HandleStart(const media_timed_event* event,
|
||||||
bigtime_t lateness, bool realTimeEvent = false);
|
bigtime_t lateness,
|
||||||
status_t _HandleSeek(const media_timed_event* event,
|
bool realTimeEvent = false);
|
||||||
bigtime_t lateness, bool realTimeEvent = false);
|
status_t _HandleSeek(const media_timed_event* event,
|
||||||
status_t _HandleWarp(const media_timed_event* event,
|
bigtime_t lateness,
|
||||||
bigtime_t lateness, bool realTimeEvent = false);
|
bool realTimeEvent = false);
|
||||||
status_t _HandleStop(const media_timed_event* event,
|
status_t _HandleWarp(const media_timed_event* event,
|
||||||
bigtime_t lateness, bool realTimeEvent = false);
|
bigtime_t lateness,
|
||||||
status_t _HandleBuffer(const media_timed_event* event,
|
bool realTimeEvent = false);
|
||||||
bigtime_t lateness, bool realTimeEvent = false);
|
status_t _HandleStop(const media_timed_event* event,
|
||||||
status_t _HandleDataStatus(const media_timed_event* event,
|
bigtime_t lateness,
|
||||||
bigtime_t lateness, bool realTimeEvent = false);
|
bool realTimeEvent = false);
|
||||||
status_t _HandleParameter(const media_timed_event* event,
|
status_t _HandleBuffer(const media_timed_event* event,
|
||||||
bigtime_t lateness, bool realTimeEvent = false);
|
bigtime_t lateness,
|
||||||
|
bool realTimeEvent = false);
|
||||||
|
status_t _HandleDataStatus(
|
||||||
|
const media_timed_event* event,
|
||||||
|
bigtime_t lateness,
|
||||||
|
bool realTimeEvent = false);
|
||||||
|
status_t _HandleParameter(const media_timed_event* event,
|
||||||
|
bigtime_t lateness,
|
||||||
|
bool realTimeEvent = false);
|
||||||
|
|
||||||
char* _PlaybackBuffer(int32 cycle, int32 channel)
|
char* _PlaybackBuffer(int32 cycle, int32 channel)
|
||||||
{ return fDevice->BufferList().playback_buffers
|
{ return fDevice->BufferList()
|
||||||
[cycle][channel].base; }
|
.playback_buffers
|
||||||
uint32 _PlaybackStride(int32 cycle, int32 channel)
|
[cycle][channel].base; }
|
||||||
{ return fDevice->BufferList().playback_buffers
|
uint32 _PlaybackStride(int32 cycle, int32 channel)
|
||||||
[cycle][channel].stride; }
|
{ return fDevice->BufferList()
|
||||||
|
.playback_buffers
|
||||||
|
[cycle][channel].stride; }
|
||||||
|
|
||||||
char* _RecordBuffer(int32 cycle, int32 channel)
|
char* _RecordBuffer(int32 cycle, int32 channel)
|
||||||
{ return fDevice->BufferList().record_buffers
|
{ return fDevice->BufferList()
|
||||||
[cycle][channel].base; }
|
.record_buffers
|
||||||
uint32 _RecordStride(int32 cycle, int32 channel)
|
[cycle][channel].base; }
|
||||||
{ return fDevice->BufferList().record_buffers
|
uint32 _RecordStride(int32 cycle, int32 channel)
|
||||||
[cycle][channel].stride; }
|
{ return fDevice->BufferList()
|
||||||
|
.record_buffers
|
||||||
|
[cycle][channel].stride; }
|
||||||
|
|
||||||
void _WriteZeros(node_input& input, uint32 bufferCycle);
|
void _WriteZeros(node_input& input,
|
||||||
void _FillWithZeros(node_input& input);
|
uint32 bufferCycle);
|
||||||
void _FillNextBuffer(node_input& channel,
|
void _FillWithZeros(node_input& input);
|
||||||
BBuffer* buffer);
|
void _FillNextBuffer(node_input& channel,
|
||||||
|
BBuffer* buffer);
|
||||||
|
|
||||||
static int32 _OutputThreadEntry(void* data);
|
static int32 _OutputThreadEntry(void* data);
|
||||||
int32 _OutputThread();
|
int32 _OutputThread();
|
||||||
status_t _StartOutputThreadIfNeeded();
|
status_t _StartOutputThreadIfNeeded();
|
||||||
status_t _StopOutputThread();
|
status_t _StopOutputThread();
|
||||||
|
|
||||||
void _AllocateBuffers(node_output& channel);
|
void _AllocateBuffers(node_output& channel);
|
||||||
BBuffer* _FillNextBuffer(multi_buffer_info& info,
|
BBuffer* _FillNextBuffer(multi_buffer_info& info,
|
||||||
node_output& output);
|
node_output& output);
|
||||||
void _UpdateTimeSource(multi_buffer_info& info,
|
void _UpdateTimeSource(multi_buffer_info& info,
|
||||||
multi_buffer_info& oldInfo, node_input& input);
|
multi_buffer_info& oldInfo,
|
||||||
|
node_input& input);
|
||||||
|
|
||||||
node_output* _FindOutput(media_source source);
|
node_output* _FindOutput(media_source source);
|
||||||
node_input* _FindInput(media_destination destination);
|
node_input* _FindInput(media_destination destination);
|
||||||
node_input* _FindInput(int32 destinationId);
|
node_input* _FindInput(int32 destinationId);
|
||||||
|
|
||||||
const char* _GetControlName(multi_mix_control& control);
|
const char* _GetControlName(multi_mix_control& control);
|
||||||
void _ProcessGroup(BParameterGroup* group, int32 index,
|
void _ProcessGroup(BParameterGroup* group,
|
||||||
int32& numParameters);
|
int32 index, int32& numParameters);
|
||||||
void _ProcessMux(BDiscreteParameter* parameter,
|
void _ProcessMux(BDiscreteParameter* parameter,
|
||||||
int32 index);
|
int32 index);
|
||||||
void _CreateFrequencyParameterGroup(
|
void _CreateFrequencyParameterGroup(
|
||||||
BParameterGroup* parentGroup, const char* name,
|
BParameterGroup* parentGroup,
|
||||||
int32 parameterID, uint32 rateMask);
|
const char* name, int32 parameterID,
|
||||||
|
uint32 rateMask);
|
||||||
|
|
||||||
status_t _SetNodeInputFrameRate(float frameRate);
|
status_t _SetNodeInputFrameRate(float frameRate);
|
||||||
status_t _SetNodeOutputFrameRate(float frameRate);
|
status_t _SetNodeOutputFrameRate(float frameRate);
|
||||||
void _UpdateInternalLatency(const media_format& format);
|
void _UpdateInternalLatency(
|
||||||
|
const media_format& format);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
status_t fInitStatus;
|
status_t fInitStatus;
|
||||||
|
|
||||||
BMediaAddOn* fAddOn;
|
BMediaAddOn* fAddOn;
|
||||||
int32 fId;
|
int32 fId;
|
||||||
|
|
||||||
BLocker fBufferLock;
|
BLocker fBufferLock;
|
||||||
|
|
||||||
BList fInputs;
|
BList fInputs;
|
||||||
TimeComputer fTimeComputer;
|
TimeComputer fTimeComputer;
|
||||||
|
|
||||||
bigtime_t fLatency;
|
bigtime_t fLatency;
|
||||||
BList fOutputs;
|
BList fOutputs;
|
||||||
media_format fOutputPreferredFormat;
|
media_format fOutputPreferredFormat;
|
||||||
media_format fInputPreferredFormat;
|
media_format fInputPreferredFormat;
|
||||||
|
|
||||||
bigtime_t fInternalLatency;
|
bigtime_t fInternalLatency;
|
||||||
// this is computed from the real (negotiated) chunk size and bit rate,
|
// this is computed from the real (negotiated) chunk size and bit rate,
|
||||||
// not the defaults that are in the parameters
|
// not the defaults that are in the parameters
|
||||||
bigtime_t fBufferPeriod;
|
bigtime_t fBufferPeriod;
|
||||||
|
|
||||||
sem_id fBufferFreeSem;
|
sem_id fBufferFreeSem;
|
||||||
thread_id fThread;
|
thread_id fThread;
|
||||||
MultiAudioDevice* fDevice;
|
MultiAudioDevice* fDevice;
|
||||||
bool fTimeSourceStarted;
|
bool fTimeSourceStarted;
|
||||||
BParameterWeb* fWeb;
|
BParameterWeb* fWeb;
|
||||||
BMessage fConfig;
|
BMessage fConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // MULTI_AUDIO_NODE_H
|
#endif // MULTI_AUDIO_NODE_H
|
||||||
|
|||||||
Reference in New Issue
Block a user