288 | | bool |
---|
289 | | BeBoB::AvDeviceSubunitAudio::discoverConnections() |
---|
290 | | { |
---|
291 | | debugOutput(DEBUG_LEVEL_NORMAL, "Discovering connections...\n"); |
---|
292 | | if ( !AvDeviceSubunit::discoverConnections() ) { |
---|
293 | | return false; |
---|
294 | | } |
---|
295 | | |
---|
296 | | for ( FunctionBlockVector::iterator it = m_functions.begin(); |
---|
| 193 | |
---|
| 194 | const char* |
---|
| 195 | SubunitAudio::getName() |
---|
| 196 | { |
---|
| 197 | return "AudioSubunit"; |
---|
| 198 | } |
---|
| 199 | |
---|
| 200 | // bool |
---|
| 201 | // SubunitAudio::discoverConnections() |
---|
| 202 | // { |
---|
| 203 | // debugOutput(DEBUG_LEVEL_NORMAL, "Discovering connections...\n"); |
---|
| 204 | // if ( !Subunit::discoverConnections() ) { |
---|
| 205 | // return false; |
---|
| 206 | // } |
---|
| 207 | // |
---|
| 208 | // for ( BeBoB::FunctionBlockVector::iterator it = m_functions.begin(); |
---|
| 209 | // it != m_functions.end(); |
---|
| 210 | // ++it ) |
---|
| 211 | // { |
---|
| 212 | // BeBoB::FunctionBlock* function = *it; |
---|
| 213 | // if ( !function->discoverConnections() ) { |
---|
| 214 | // debugError( "functionblock connection discovering failed ('%s')\n", |
---|
| 215 | // function->getName() ); |
---|
| 216 | // return false; |
---|
| 217 | // } |
---|
| 218 | // } |
---|
| 219 | // |
---|
| 220 | // return true; |
---|
| 221 | // } |
---|
| 222 | // bool |
---|
| 223 | // SubunitAudio::discoverBeBoB::FunctionBlocks() |
---|
| 224 | // { |
---|
| 225 | // debugOutput( DEBUG_LEVEL_NORMAL, |
---|
| 226 | // "Discovering function blocks...\n"); |
---|
| 227 | // |
---|
| 228 | // if ( !discoverBeBoB::FunctionBlocksDo( |
---|
| 229 | // ExtendedSubunitInfoCmd::eFBT_AudioSubunitSelector) ) |
---|
| 230 | // { |
---|
| 231 | // debugError( "Could not discover function block selector\n" ); |
---|
| 232 | // return false; |
---|
| 233 | // } |
---|
| 234 | // if ( !discoverBeBoB::FunctionBlocksDo( |
---|
| 235 | // ExtendedSubunitInfoCmd::eFBT_AudioSubunitFeature) ) |
---|
| 236 | // { |
---|
| 237 | // debugError( "Could not discover function block feature\n" ); |
---|
| 238 | // return false; |
---|
| 239 | // } |
---|
| 240 | // if ( !discoverBeBoB::FunctionBlocksDo( |
---|
| 241 | // ExtendedSubunitInfoCmd::eFBT_AudioSubunitProcessing) ) |
---|
| 242 | // { |
---|
| 243 | // debugError( "Could not discover function block processing\n" ); |
---|
| 244 | // return false; |
---|
| 245 | // } |
---|
| 246 | // if ( !discoverBeBoB::FunctionBlocksDo( |
---|
| 247 | // ExtendedSubunitInfoCmd::eFBT_AudioSubunitCodec) ) |
---|
| 248 | // { |
---|
| 249 | // debugError( "Could not discover function block codec\n" ); |
---|
| 250 | // return false; |
---|
| 251 | // } |
---|
| 252 | // |
---|
| 253 | // // print a function block list |
---|
| 254 | // #ifdef DEBUG |
---|
| 255 | // if (getDebugLevel() >= DEBUG_LEVEL_NORMAL) { |
---|
| 256 | // |
---|
| 257 | // for ( BeBoB::FunctionBlockVector::iterator it = m_functions.begin(); |
---|
| 258 | // it != m_functions.end(); |
---|
| 259 | // ++it ) |
---|
| 260 | // { |
---|
| 261 | // debugOutput(DEBUG_LEVEL_NORMAL, "%20s FB, type 0x%X, id=%d\n", |
---|
| 262 | // (*it)->getName(), |
---|
| 263 | // (*it)->getType(), |
---|
| 264 | // (*it)->getId()); |
---|
| 265 | // } |
---|
| 266 | // } |
---|
| 267 | // #endif |
---|
| 268 | // |
---|
| 269 | // return true; |
---|
| 270 | // } |
---|
| 271 | // |
---|
| 272 | // bool |
---|
| 273 | // SubunitAudio::discoverBeBoB::FunctionBlocksDo( |
---|
| 274 | // ExtendedSubunitInfoCmd::EBeBoB::FunctionBlockType fbType ) |
---|
| 275 | // { |
---|
| 276 | // int page = 0; |
---|
| 277 | // bool cmdSuccess = false; |
---|
| 278 | // bool finished = false; |
---|
| 279 | // |
---|
| 280 | // do { |
---|
| 281 | // ExtendedSubunitInfoCmd |
---|
| 282 | // extSubunitInfoCmd( m_unit->get1394Service() ); |
---|
| 283 | // extSubunitInfoCmd.setNodeId( m_unit->getConfigRom().getNodeId() ); |
---|
| 284 | // extSubunitInfoCmd.setCommandType( AVCCommand::eCT_Status ); |
---|
| 285 | // extSubunitInfoCmd.setSubunitId( getSubunitId() ); |
---|
| 286 | // extSubunitInfoCmd.setSubunitType( getSubunitType() ); |
---|
| 287 | // extSubunitInfoCmd.setVerbose( m_verboseLevel ); |
---|
| 288 | // |
---|
| 289 | // extSubunitInfoCmd.m_fbType = fbType; |
---|
| 290 | // extSubunitInfoCmd.m_page = page; |
---|
| 291 | // |
---|
| 292 | // cmdSuccess = extSubunitInfoCmd.fire(); |
---|
| 293 | // if ( cmdSuccess |
---|
| 294 | // && ( extSubunitInfoCmd.getResponse() |
---|
| 295 | // == AVCCommand::eR_Implemented ) ) |
---|
| 296 | // { |
---|
| 297 | // for ( ExtendedSubunitInfoPageDataVector::iterator it = |
---|
| 298 | // extSubunitInfoCmd.m_infoPageDatas.begin(); |
---|
| 299 | // cmdSuccess |
---|
| 300 | // && ( it != extSubunitInfoCmd.m_infoPageDatas.end() ); |
---|
| 301 | // ++it ) |
---|
| 302 | // { |
---|
| 303 | // cmdSuccess = createBeBoB::FunctionBlock( fbType, **it ); |
---|
| 304 | // } |
---|
| 305 | // if ( ( extSubunitInfoCmd.m_infoPageDatas.size() != 0 ) |
---|
| 306 | // && ( extSubunitInfoCmd.m_infoPageDatas.size() == 5 ) ) |
---|
| 307 | // { |
---|
| 308 | // page++; |
---|
| 309 | // } else { |
---|
| 310 | // finished = true; |
---|
| 311 | // } |
---|
| 312 | // } else { |
---|
| 313 | // finished = true; |
---|
| 314 | // } |
---|
| 315 | // } while ( cmdSuccess && !finished ); |
---|
| 316 | // |
---|
| 317 | // return cmdSuccess; |
---|
| 318 | // } |
---|
| 319 | // |
---|
| 320 | // bool |
---|
| 321 | // SubunitAudio::createBeBoB::FunctionBlock( |
---|
| 322 | // ExtendedSubunitInfoCmd::EBeBoB::FunctionBlockType fbType, |
---|
| 323 | // ExtendedSubunitInfoPageData& data ) |
---|
| 324 | // { |
---|
| 325 | // BeBoB::FunctionBlock::ESpecialPurpose purpose |
---|
| 326 | // = convertSpecialPurpose( data.m_functionBlockSpecialPupose ); |
---|
| 327 | // |
---|
| 328 | // BeBoB::FunctionBlock* fb = 0; |
---|
| 329 | // |
---|
| 330 | // switch ( fbType ) { |
---|
| 331 | // case ExtendedSubunitInfoCmd::eFBT_AudioSubunitSelector: |
---|
| 332 | // { |
---|
| 333 | // fb = new BeBoB::FunctionBlockSelector( *this, |
---|
| 334 | // data.m_functionBlockId, |
---|
| 335 | // purpose, |
---|
| 336 | // data.m_noOfInputPlugs, |
---|
| 337 | // data.m_noOfOutputPlugs, |
---|
| 338 | // m_verboseLevel ); |
---|
| 339 | // } |
---|
| 340 | // break; |
---|
| 341 | // case ExtendedSubunitInfoCmd::eFBT_AudioSubunitFeature: |
---|
| 342 | // { |
---|
| 343 | // fb = new BeBoB::FunctionBlockFeature( *this, |
---|
| 344 | // data.m_functionBlockId, |
---|
| 345 | // purpose, |
---|
| 346 | // data.m_noOfInputPlugs, |
---|
| 347 | // data.m_noOfOutputPlugs, |
---|
| 348 | // m_verboseLevel ); |
---|
| 349 | // } |
---|
| 350 | // break; |
---|
| 351 | // case ExtendedSubunitInfoCmd::eFBT_AudioSubunitProcessing: |
---|
| 352 | // { |
---|
| 353 | // switch ( data.m_functionBlockType ) { |
---|
| 354 | // case ExtendedSubunitInfoCmd::ePT_EnhancedMixer: |
---|
| 355 | // { |
---|
| 356 | // fb = new BeBoB::FunctionBlockEnhancedMixer( *this, |
---|
| 357 | // data.m_functionBlockId, |
---|
| 358 | // purpose, |
---|
| 359 | // data.m_noOfInputPlugs, |
---|
| 360 | // data.m_noOfOutputPlugs, |
---|
| 361 | // m_verboseLevel ); |
---|
| 362 | // } |
---|
| 363 | // break; |
---|
| 364 | // case ExtendedSubunitInfoCmd::ePT_Mixer: |
---|
| 365 | // case ExtendedSubunitInfoCmd::ePT_Generic: |
---|
| 366 | // case ExtendedSubunitInfoCmd::ePT_UpDown: |
---|
| 367 | // case ExtendedSubunitInfoCmd::ePT_DolbyProLogic: |
---|
| 368 | // case ExtendedSubunitInfoCmd::ePT_3DStereoExtender: |
---|
| 369 | // case ExtendedSubunitInfoCmd::ePT_Reverberation: |
---|
| 370 | // case ExtendedSubunitInfoCmd::ePT_Chorus: |
---|
| 371 | // case ExtendedSubunitInfoCmd::ePT_DynamicRangeCompression: |
---|
| 372 | // default: |
---|
| 373 | // fb = new BeBoB::FunctionBlockProcessing( *this, |
---|
| 374 | // data.m_functionBlockId, |
---|
| 375 | // purpose, |
---|
| 376 | // data.m_noOfInputPlugs, |
---|
| 377 | // data.m_noOfOutputPlugs, |
---|
| 378 | // m_verboseLevel ); |
---|
| 379 | // debugWarning( "Dummy function block processing created. " |
---|
| 380 | // "Implementation is missing\n" ); |
---|
| 381 | // } |
---|
| 382 | // } |
---|
| 383 | // break; |
---|
| 384 | // case ExtendedSubunitInfoCmd::eFBT_AudioSubunitCodec: |
---|
| 385 | // { |
---|
| 386 | // fb = new BeBoB::FunctionBlockCodec( *this, |
---|
| 387 | // data.m_functionBlockId, |
---|
| 388 | // purpose, |
---|
| 389 | // data.m_noOfInputPlugs, |
---|
| 390 | // data.m_noOfOutputPlugs, |
---|
| 391 | // m_verboseLevel ); |
---|
| 392 | // debugWarning( "Dummy function block codec created. " |
---|
| 393 | // "Implementation is missing\n" ); |
---|
| 394 | // } |
---|
| 395 | // break; |
---|
| 396 | // default: |
---|
| 397 | // debugError( "Unhandled function block type found\n" ); |
---|
| 398 | // return false; |
---|
| 399 | // } |
---|
| 400 | // |
---|
| 401 | // if ( !fb ) { |
---|
| 402 | // debugError( "Could create function block\n" ); |
---|
| 403 | // return false; |
---|
| 404 | // } |
---|
| 405 | // if ( !fb->discover() ) { |
---|
| 406 | // debugError( "Could not discover function block %s\n", |
---|
| 407 | // fb->getName() ); |
---|
| 408 | // delete fb; |
---|
| 409 | // return false; |
---|
| 410 | // } |
---|
| 411 | // m_functions.push_back( fb ); |
---|
| 412 | // |
---|
| 413 | // return true; |
---|
| 414 | // } |
---|
| 415 | // |
---|
| 416 | // BeBoB::FunctionBlock::ESpecialPurpose |
---|
| 417 | // SubunitAudio::convertSpecialPurpose( |
---|
| 418 | // function_block_special_purpose_t specialPurpose ) |
---|
| 419 | // { |
---|
| 420 | // BeBoB::FunctionBlock::ESpecialPurpose p; |
---|
| 421 | // switch ( specialPurpose ) { |
---|
| 422 | // case ExtendedSubunitInfoPageData::eSP_InputGain: |
---|
| 423 | // p = BeBoB::FunctionBlock::eSP_InputGain; |
---|
| 424 | // break; |
---|
| 425 | // case ExtendedSubunitInfoPageData::eSP_OutputVolume: |
---|
| 426 | // p = BeBoB::FunctionBlock::eSP_OutputVolume; |
---|
| 427 | // break; |
---|
| 428 | // default: |
---|
| 429 | // p = BeBoB::FunctionBlock::eSP_NoSpecialPurpose; |
---|
| 430 | // } |
---|
| 431 | // return p; |
---|
| 432 | // } |
---|
| 433 | // |
---|
| 434 | bool |
---|
| 435 | SubunitAudio::serializeChild( Glib::ustring basePath, |
---|
| 436 | Util::IOSerialize& ser ) const |
---|
| 437 | { |
---|
| 438 | bool result = true; |
---|
| 439 | int i = 0; |
---|
| 440 | |
---|
| 441 | for ( BeBoB::FunctionBlockVector::const_iterator it = m_functions.begin(); |
---|
300 | | FunctionBlock* function = *it; |
---|
301 | | if ( !function->discoverConnections() ) { |
---|
302 | | debugError( "functionblock connection discovering failed ('%s')\n", |
---|
303 | | function->getName() ); |
---|
304 | | return false; |
---|
305 | | } |
---|
306 | | } |
---|
307 | | |
---|
308 | | return true; |
---|
309 | | } |
---|
310 | | |
---|
311 | | const char* |
---|
312 | | BeBoB::AvDeviceSubunitAudio::getName() |
---|
313 | | { |
---|
314 | | return "AudioSubunit"; |
---|
315 | | } |
---|
316 | | |
---|
317 | | bool |
---|
318 | | BeBoB::AvDeviceSubunitAudio::discoverFunctionBlocks() |
---|
319 | | { |
---|
320 | | debugOutput( DEBUG_LEVEL_NORMAL, |
---|
321 | | "Discovering function blocks...\n"); |
---|
322 | | |
---|
323 | | if ( !discoverFunctionBlocksDo( |
---|
324 | | ExtendedSubunitInfoCmd::eFBT_AudioSubunitSelector) ) |
---|
325 | | { |
---|
326 | | debugError( "Could not discover function block selector\n" ); |
---|
327 | | return false; |
---|
328 | | } |
---|
329 | | if ( !discoverFunctionBlocksDo( |
---|
330 | | ExtendedSubunitInfoCmd::eFBT_AudioSubunitFeature) ) |
---|
331 | | { |
---|
332 | | debugError( "Could not discover function block feature\n" ); |
---|
333 | | return false; |
---|
334 | | } |
---|
335 | | if ( !discoverFunctionBlocksDo( |
---|
336 | | ExtendedSubunitInfoCmd::eFBT_AudioSubunitProcessing) ) |
---|
337 | | { |
---|
338 | | debugError( "Could not discover function block processing\n" ); |
---|
339 | | return false; |
---|
340 | | } |
---|
341 | | if ( !discoverFunctionBlocksDo( |
---|
342 | | ExtendedSubunitInfoCmd::eFBT_AudioSubunitCodec) ) |
---|
343 | | { |
---|
344 | | debugError( "Could not discover function block codec\n" ); |
---|
345 | | return false; |
---|
346 | | } |
---|
347 | | |
---|
348 | | // print a function block list |
---|
349 | | #ifdef DEBUG |
---|
350 | | if (getDebugLevel() >= DEBUG_LEVEL_NORMAL) { |
---|
351 | | |
---|
352 | | for ( FunctionBlockVector::iterator it = m_functions.begin(); |
---|
353 | | it != m_functions.end(); |
---|
354 | | ++it ) |
---|
355 | | { |
---|
356 | | debugOutput(DEBUG_LEVEL_NORMAL, "%20s FB, type 0x%X, id=%d\n", |
---|
357 | | (*it)->getName(), |
---|
358 | | (*it)->getType(), |
---|
359 | | (*it)->getId()); |
---|
360 | | } |
---|
361 | | } |
---|
362 | | #endif |
---|
363 | | |
---|
364 | | return true; |
---|
365 | | } |
---|
366 | | |
---|
367 | | bool |
---|
368 | | BeBoB::AvDeviceSubunitAudio::discoverFunctionBlocksDo( |
---|
369 | | ExtendedSubunitInfoCmd::EFunctionBlockType fbType ) |
---|
370 | | { |
---|
371 | | int page = 0; |
---|
372 | | bool cmdSuccess = false; |
---|
373 | | bool finished = false; |
---|
374 | | |
---|
375 | | do { |
---|
376 | | ExtendedSubunitInfoCmd |
---|
377 | | extSubunitInfoCmd( m_avDevice->get1394Service() ); |
---|
378 | | extSubunitInfoCmd.setNodeId( m_avDevice->getConfigRom().getNodeId() ); |
---|
379 | | extSubunitInfoCmd.setCommandType( AVCCommand::eCT_Status ); |
---|
380 | | extSubunitInfoCmd.setSubunitId( getSubunitId() ); |
---|
381 | | extSubunitInfoCmd.setSubunitType( getSubunitType() ); |
---|
382 | | extSubunitInfoCmd.setVerbose( m_verboseLevel ); |
---|
383 | | |
---|
384 | | extSubunitInfoCmd.m_fbType = fbType; |
---|
385 | | extSubunitInfoCmd.m_page = page; |
---|
386 | | |
---|
387 | | cmdSuccess = extSubunitInfoCmd.fire(); |
---|
388 | | if ( cmdSuccess |
---|
389 | | && ( extSubunitInfoCmd.getResponse() |
---|
390 | | == AVCCommand::eR_Implemented ) ) |
---|
391 | | { |
---|
392 | | for ( ExtendedSubunitInfoPageDataVector::iterator it = |
---|
393 | | extSubunitInfoCmd.m_infoPageDatas.begin(); |
---|
394 | | cmdSuccess |
---|
395 | | && ( it != extSubunitInfoCmd.m_infoPageDatas.end() ); |
---|
396 | | ++it ) |
---|
397 | | { |
---|
398 | | cmdSuccess = createFunctionBlock( fbType, **it ); |
---|
399 | | } |
---|
400 | | if ( ( extSubunitInfoCmd.m_infoPageDatas.size() != 0 ) |
---|
401 | | && ( extSubunitInfoCmd.m_infoPageDatas.size() == 5 ) ) |
---|
402 | | { |
---|
403 | | page++; |
---|
404 | | } else { |
---|
405 | | finished = true; |
---|
406 | | } |
---|
407 | | } else { |
---|
408 | | finished = true; |
---|
409 | | } |
---|
410 | | } while ( cmdSuccess && !finished ); |
---|
411 | | |
---|
412 | | return cmdSuccess; |
---|
413 | | } |
---|
414 | | |
---|
415 | | bool |
---|
416 | | BeBoB::AvDeviceSubunitAudio::createFunctionBlock( |
---|
417 | | ExtendedSubunitInfoCmd::EFunctionBlockType fbType, |
---|
418 | | ExtendedSubunitInfoPageData& data ) |
---|
419 | | { |
---|
420 | | FunctionBlock::ESpecialPurpose purpose |
---|
421 | | = convertSpecialPurpose( data.m_functionBlockSpecialPupose ); |
---|
422 | | |
---|
423 | | FunctionBlock* fb = 0; |
---|
424 | | |
---|
425 | | switch ( fbType ) { |
---|
426 | | case ExtendedSubunitInfoCmd::eFBT_AudioSubunitSelector: |
---|
427 | | { |
---|
428 | | fb = new FunctionBlockSelector( *this, |
---|
429 | | data.m_functionBlockId, |
---|
430 | | purpose, |
---|
431 | | data.m_noOfInputPlugs, |
---|
432 | | data.m_noOfOutputPlugs, |
---|
433 | | m_verboseLevel ); |
---|
434 | | } |
---|
435 | | break; |
---|
436 | | case ExtendedSubunitInfoCmd::eFBT_AudioSubunitFeature: |
---|
437 | | { |
---|
438 | | fb = new FunctionBlockFeature( *this, |
---|
439 | | data.m_functionBlockId, |
---|
440 | | purpose, |
---|
441 | | data.m_noOfInputPlugs, |
---|
442 | | data.m_noOfOutputPlugs, |
---|
443 | | m_verboseLevel ); |
---|
444 | | } |
---|
445 | | break; |
---|
446 | | case ExtendedSubunitInfoCmd::eFBT_AudioSubunitProcessing: |
---|
447 | | { |
---|
448 | | switch ( data.m_functionBlockType ) { |
---|
449 | | case ExtendedSubunitInfoCmd::ePT_EnhancedMixer: |
---|
450 | | { |
---|
451 | | fb = new FunctionBlockEnhancedMixer( *this, |
---|
452 | | data.m_functionBlockId, |
---|
453 | | purpose, |
---|
454 | | data.m_noOfInputPlugs, |
---|
455 | | data.m_noOfOutputPlugs, |
---|
456 | | m_verboseLevel ); |
---|
457 | | } |
---|
458 | | break; |
---|
459 | | case ExtendedSubunitInfoCmd::ePT_Mixer: |
---|
460 | | case ExtendedSubunitInfoCmd::ePT_Generic: |
---|
461 | | case ExtendedSubunitInfoCmd::ePT_UpDown: |
---|
462 | | case ExtendedSubunitInfoCmd::ePT_DolbyProLogic: |
---|
463 | | case ExtendedSubunitInfoCmd::ePT_3DStereoExtender: |
---|
464 | | case ExtendedSubunitInfoCmd::ePT_Reverberation: |
---|
465 | | case ExtendedSubunitInfoCmd::ePT_Chorus: |
---|
466 | | case ExtendedSubunitInfoCmd::ePT_DynamicRangeCompression: |
---|
467 | | default: |
---|
468 | | fb = new FunctionBlockProcessing( *this, |
---|
469 | | data.m_functionBlockId, |
---|
470 | | purpose, |
---|
471 | | data.m_noOfInputPlugs, |
---|
472 | | data.m_noOfOutputPlugs, |
---|
473 | | m_verboseLevel ); |
---|
474 | | debugWarning( "Dummy function block processing created. " |
---|
475 | | "Implementation is missing\n" ); |
---|
476 | | } |
---|
477 | | } |
---|
478 | | break; |
---|
479 | | case ExtendedSubunitInfoCmd::eFBT_AudioSubunitCodec: |
---|
480 | | { |
---|
481 | | fb = new FunctionBlockCodec( *this, |
---|
482 | | data.m_functionBlockId, |
---|
483 | | purpose, |
---|
484 | | data.m_noOfInputPlugs, |
---|
485 | | data.m_noOfOutputPlugs, |
---|
486 | | m_verboseLevel ); |
---|
487 | | debugWarning( "Dummy function block codec created. " |
---|
488 | | "Implementation is missing\n" ); |
---|
489 | | } |
---|
490 | | break; |
---|
491 | | default: |
---|
492 | | debugError( "Unhandled function block type found\n" ); |
---|
493 | | return false; |
---|
494 | | } |
---|
495 | | |
---|
496 | | if ( !fb ) { |
---|
497 | | debugError( "Could create function block\n" ); |
---|
498 | | return false; |
---|
499 | | } |
---|
500 | | if ( !fb->discover() ) { |
---|
501 | | debugError( "Could not discover function block %s\n", |
---|
502 | | fb->getName() ); |
---|
503 | | delete fb; |
---|
504 | | return false; |
---|
505 | | } |
---|
506 | | m_functions.push_back( fb ); |
---|
507 | | |
---|
508 | | return true; |
---|
509 | | } |
---|
510 | | |
---|
511 | | BeBoB::FunctionBlock::ESpecialPurpose |
---|
512 | | BeBoB::AvDeviceSubunitAudio::convertSpecialPurpose( |
---|
513 | | function_block_special_purpose_t specialPurpose ) |
---|
514 | | { |
---|
515 | | FunctionBlock::ESpecialPurpose p; |
---|
516 | | switch ( specialPurpose ) { |
---|
517 | | case ExtendedSubunitInfoPageData::eSP_InputGain: |
---|
518 | | p = FunctionBlock::eSP_InputGain; |
---|
519 | | break; |
---|
520 | | case ExtendedSubunitInfoPageData::eSP_OutputVolume: |
---|
521 | | p = FunctionBlock::eSP_OutputVolume; |
---|
522 | | break; |
---|
523 | | default: |
---|
524 | | p = FunctionBlock::eSP_NoSpecialPurpose; |
---|
525 | | } |
---|
526 | | return p; |
---|
527 | | } |
---|
528 | | |
---|
529 | | bool |
---|
530 | | BeBoB::AvDeviceSubunitAudio::serializeChild( Glib::ustring basePath, |
---|
531 | | Util::IOSerialize& ser ) const |
---|
532 | | { |
---|
533 | | bool result = true; |
---|
534 | | int i = 0; |
---|
535 | | |
---|
536 | | for ( FunctionBlockVector::const_iterator it = m_functions.begin(); |
---|
537 | | it != m_functions.end(); |
---|
538 | | ++it ) |
---|
539 | | { |
---|
540 | | FunctionBlock* pFB = *it; |
---|
| 445 | BeBoB::FunctionBlock* pFB = *it; |
---|