Changeset 548 for branches/echoaudio/src/genericavc/avc_avdevice.cpp
- Timestamp:
- 08/21/07 10:12:58 (16 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/echoaudio/src/genericavc/avc_avdevice.cpp
r541 r548 65 65 debugOutput( DEBUG_LEVEL_VERBOSE, "Created GenericAVC::AvDevice (NodeID %d)\n", 66 66 nodeId ); 67 addOption(Util::OptionContainer::Option("snoopMode",false)); 67 68 } 68 69 … … 134 135 } 135 136 137 void 138 AvDevice::setVerboseLevel(int l) 139 { 140 m_pPlugManager->setVerboseLevel(l); 141 142 FFADODevice::setVerboseLevel(l); 143 AVC::Unit::setVerboseLevel(l); 144 } 145 136 146 int 137 147 AvDevice::getSamplingFrequency( ) { … … 159 169 AvDevice::setSamplingFrequency( int s ) 160 170 { 161 ESamplingFrequency samplingFrequency=parseSampleRate( s );162 171 bool snoopMode=false; 163 172 if(!getOption("snoopMode", snoopMode)) { … … 167 176 if(snoopMode) { 168 177 int current_sr=getSamplingFrequency(); 169 if (current_sr != convertESamplingFrequency( samplingFrequency )) {178 if (current_sr != s ) { 170 179 debugError("In snoop mode it is impossible to set the sample rate.\n"); 171 180 debugError("Please start the client with the correct setting.\n"); … … 180 189 } 181 190 182 if ( !plug->setSampleRate( convertESamplingFrequency( samplingFrequency )) )191 if ( !plug->setSampleRate( s ) ) 183 192 { 184 193 debugError( "setSampleRate: Setting sample rate failed\n" ); … … 192 201 } 193 202 194 if ( !plug->setSampleRate( convertESamplingFrequency( samplingFrequency )) )203 if ( !plug->setSampleRate( s ) ) 195 204 { 196 205 debugError( "setSampleRate: Setting sample rate failed\n" ); … … 200 209 debugOutput( DEBUG_LEVEL_VERBOSE, 201 210 "setSampleRate: Set sample rate to %d\n", 202 convertESamplingFrequency( samplingFrequency ));211 s ); 203 212 return true; 204 213 } … … 348 357 Streaming::StreamProcessor *processor, 349 358 Streaming::AmdtpAudioPort::E_Direction direction) { 350 351 debugOutput(DEBUG_LEVEL_VERBOSE, " Adding plug %s to processor\n", plug.getName());352 359 353 360 std::string id=std::string("dev?"); … … 362 369 { 363 370 const Plug::ClusterInfo* clusterInfo = &( *it ); 364 365 debugOutput(DEBUG_LEVEL_VERBOSE, " Adding cluster %s\n", clusterInfo->m_name.c_str());366 371 367 372 Plug::ChannelInfoVector channelInfos = clusterInfo->m_channelInfos; … … 370 375 ++it ) 371 376 { 372 373 377 const Plug::ChannelInfo* channelInfo = &( *it ); 374 375 378 std::ostringstream portname; 376 379 … … 396 399 397 400 case ExtendedPlugInfoClusterInfoSpecificData::ePT_MIDI: 398 // HACK: for audiofire2 only !!!399 401 debugOutput(DEBUG_LEVEL_VERBOSE, " Adding MIDI channel %s (pos=0x%02X, loc=0x%02X)\n", 400 channelInfo->m_name.c_str(), (direction==Streaming::Port::E_Capture?4:6), 401 processor->getPortCount(Streaming::Port::E_Midi)); 402 channelInfo->m_name.c_str(), channelInfo->m_streamPosition, processor->getPortCount(Streaming::Port::E_Midi)); 402 403 p=new Streaming::AmdtpMidiPort( 403 404 portname.str(), 404 405 direction, 405 (direction==Streaming::Port::E_Capture?4:6), 406 // channelInfo->m_streamPosition, 406 channelInfo->m_streamPosition, 407 407 // Workaround for out-of-spec hardware 408 408 // should be: … … 420 420 case ExtendedPlugInfoClusterInfoSpecificData::ePT_MADI: 421 421 case ExtendedPlugInfoClusterInfoSpecificData::ePT_Digital: 422 debugOutput(DEBUG_LEVEL_VERBOSE, " Adding digital audio channel %s (pos=0x%02X, loc=0x%02X)\n", 423 channelInfo->m_name.c_str(), channelInfo->m_streamPosition, channelInfo->m_location); 424 p=new Streaming::AmdtpAudioPort( 425 portname.str(), 426 direction, 427 channelInfo->m_streamPosition, 428 channelInfo->m_location, 429 Streaming::AmdtpPortInfo::E_MBLA 430 ); 431 break; 432 422 433 case ExtendedPlugInfoClusterInfoSpecificData::ePT_NoType: 423 434 default: