void AudioFilterNode::NodeRegistered() { PRINT(("AudioFilterNode::NodeRegistered()\n")); status_t err; // Start the BMediaEventLooper thread SetPriority(B_REAL_TIME_PRIORITY); Run(); // init input m_input.destination.port = ControlPort(); m_input.destination.id = ID_AUDIO_INPUT; m_input.node = Node(); m_input.source = media_source::null; m_input.format.type = B_MEDIA_RAW_AUDIO; err = getRequiredInputFormat(m_input.format); ASSERT(err == B_OK); strncpy(m_input.name, "Audio Input", B_MEDIA_NAME_LENGTH); // init output m_output.source.port = ControlPort(); m_output.source.id = ID_AUDIO_MIX_OUTPUT; m_output.node = Node(); m_output.destination = media_destination::null; m_output.format.type = B_MEDIA_RAW_AUDIO; err = getRequiredOutputFormat(m_output.format); ASSERT(err == B_OK); strncpy(m_output.name, "Audio Output", B_MEDIA_NAME_LENGTH); // init parameters initParameterWeb(); }
void FlangerNode::NodeRegistered() { PRINT(("FlangerNode::NodeRegistered()\n")); // Start the BMediaEventLooper thread SetPriority(B_REAL_TIME_PRIORITY); Run(); // figure preferred ('template') format m_preferredFormat.type = B_MEDIA_RAW_AUDIO; getPreferredFormat(m_preferredFormat); // initialize current format m_format.type = B_MEDIA_RAW_AUDIO; m_format.u.raw_audio = media_raw_audio_format::wildcard; // init input m_input.destination.port = ControlPort(); m_input.destination.id = ID_AUDIO_INPUT; m_input.node = Node(); m_input.source = media_source::null; m_input.format = m_format; strncpy(m_input.name, "Audio Input", B_MEDIA_NAME_LENGTH); // init output m_output.source.port = ControlPort(); m_output.source.id = ID_AUDIO_MIX_OUTPUT; m_output.node = Node(); m_output.destination = media_destination::null; m_output.format = m_format; strncpy(m_output.name, "Mix Output", B_MEDIA_NAME_LENGTH); // init parameters initParameterValues(); initParameterWeb(); }