Changeset 419 for branches/streaming-rework/src/motu
- Timestamp:
- 02/25/07 04:28:00 (17 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/streaming-rework/src/motu/motu_avdevice.cpp
r416 r419 389 389 } 390 390 391 m_receiveProcessor=new FreebobStreaming::MotuReceiveStreamProcessor(391 m_receiveProcessor=new Streaming::MotuReceiveStreamProcessor( 392 392 m_p1394Service->getPort(), samp_freq, event_size_in); 393 393 … … 404 404 405 405 char *buff; 406 FreebobStreaming::Port *p=NULL;406 Streaming::Port *p=NULL; 407 407 408 408 // retrieve the ID … … 413 413 414 414 // Add audio capture ports 415 if (!addDirPorts( FreebobStreaming::Port::E_Capture, samp_freq, optical_in_mode)) {415 if (!addDirPorts(Streaming::Port::E_Capture, samp_freq, optical_in_mode)) { 416 416 return false; 417 417 } … … 421 421 // event data. 422 422 asprintf(&buff,"%s_cap_MIDI0",id.c_str()); 423 p = new FreebobStreaming::MotuMidiPort(buff,424 FreebobStreaming::Port::E_Capture, 4);423 p = new Streaming::MotuMidiPort(buff, 424 Streaming::Port::E_Capture, 4); 425 425 if (!p) { 426 426 debugOutput(DEBUG_LEVEL_VERBOSE, "Skipped port %s\n", buff); … … 438 438 // example of adding an control port: 439 439 // asprintf(&buff,"%s_cap_%s",id.c_str(),"myportnamehere"); 440 // p=new FreebobStreaming::MotuControlPort(440 // p=new Streaming::MotuControlPort( 441 441 // buff, 442 // FreebobStreaming::Port::E_Capture,442 // Streaming::Port::E_Capture, 443 443 // 0 // you can add all other port specific stuff you 444 444 // // need to pass by extending MotuXXXPort and MotuPortInfo … … 459 459 460 460 // Do the same for the transmit processor 461 m_transmitProcessor=new FreebobStreaming::MotuTransmitStreamProcessor(461 m_transmitProcessor=new Streaming::MotuTransmitStreamProcessor( 462 462 m_p1394Service->getPort(), getSamplingFrequency(), event_size_out); 463 463 … … 473 473 474 474 // Add audio playback ports 475 if (!addDirPorts( FreebobStreaming::Port::E_Playback, samp_freq, optical_out_mode)) {475 if (!addDirPorts(Streaming::Port::E_Playback, samp_freq, optical_out_mode)) { 476 476 return false; 477 477 } … … 481 481 // of the event data. 482 482 asprintf(&buff,"%s_pbk_MIDI0",id.c_str()); 483 p = new FreebobStreaming::MotuMidiPort(buff,484 FreebobStreaming::Port::E_Capture, 4);483 p = new Streaming::MotuMidiPort(buff, 484 Streaming::Port::E_Capture, 4); 485 485 if (!p) { 486 486 debugOutput(DEBUG_LEVEL_VERBOSE, "Skipped port %s\n", buff); … … 499 499 // asprintf(&buff,"%s_pbk_%s",id.c_str(),"myportnamehere"); 500 500 // 501 // p=new FreebobStreaming::MotuControlPort(501 // p=new Streaming::MotuControlPort( 502 502 // buff, 503 // FreebobStreaming::Port::E_Playback,503 // Streaming::Port::E_Playback, 504 504 // 0 // you can add all other port specific stuff you 505 505 // // need to pass by extending MotuXXXPort and MotuPortInfo … … 526 526 } 527 527 528 FreebobStreaming::StreamProcessor *528 Streaming::StreamProcessor * 529 529 MotuDevice::getStreamProcessorByIndex(int i) { 530 530 switch (i) { … … 730 730 /* ======================================================================= */ 731 731 732 bool MotuDevice::addPort( FreebobStreaming::StreamProcessor *s_processor,733 char *name, enum FreebobStreaming::Port::E_Direction direction,732 bool MotuDevice::addPort(Streaming::StreamProcessor *s_processor, 733 char *name, enum Streaming::Port::E_Direction direction, 734 734 int position, int size) { 735 735 /* … … 739 739 * prior to exit. 740 740 */ 741 FreebobStreaming::Port *p=NULL;742 743 p = new FreebobStreaming::MotuAudioPort(name, direction, position, size);741 Streaming::Port *p=NULL; 742 743 p = new Streaming::MotuAudioPort(name, direction, position, size); 744 744 745 745 if (!p) { … … 761 761 762 762 bool MotuDevice::addDirPorts( 763 enum FreebobStreaming::Port::E_Direction direction,763 enum Streaming::Port::E_Direction direction, 764 764 unsigned int sample_rate, unsigned int optical_mode) { 765 765 /* … … 771 771 * create all ports and just disable those which are not active. 772 772 */ 773 const char *mode_str = direction== FreebobStreaming::Port::E_Capture?"cap":"pbk";774 const char *aux_str = direction== FreebobStreaming::Port::E_Capture?"Mix1":"Phones";775 FreebobStreaming::StreamProcessor *s_processor;773 const char *mode_str = direction==Streaming::Port::E_Capture?"cap":"pbk"; 774 const char *aux_str = direction==Streaming::Port::E_Capture?"Mix1":"Phones"; 775 Streaming::StreamProcessor *s_processor; 776 776 unsigned int i, ofs; 777 777 char *buff; … … 783 783 } 784 784 785 if (direction == FreebobStreaming::Port::E_Capture) {785 if (direction == Streaming::Port::E_Capture) { 786 786 s_processor = m_receiveProcessor; 787 787 } else { … … 819 819 asprintf(&buff,"%s_%s_AES/EBU%d", id.c_str(), mode_str, i+1); 820 820 } else { 821 if (direction == FreebobStreaming::Port::E_Capture)821 if (direction == Streaming::Port::E_Capture) 822 822 asprintf(&buff,"%s_%s_Mic%d", id.c_str(), mode_str, i+1); 823 823 else branches/streaming-rework/src/motu/motu_avdevice.h
r416 r419 113 113 114 114 virtual int getStreamCount(); 115 virtual FreebobStreaming::StreamProcessor *getStreamProcessorByIndex(int i);115 virtual Streaming::StreamProcessor *getStreamProcessorByIndex(int i); 116 116 117 117 virtual bool prepare(); … … 140 140 signed int m_bandwidth; 141 141 142 FreebobStreaming::MotuReceiveStreamProcessor *m_receiveProcessor;143 FreebobStreaming::MotuTransmitStreamProcessor *m_transmitProcessor;142 Streaming::MotuReceiveStreamProcessor *m_receiveProcessor; 143 Streaming::MotuTransmitStreamProcessor *m_transmitProcessor; 144 144 145 145 private: 146 bool addPort( FreebobStreaming::StreamProcessor *s_processor,146 bool addPort(Streaming::StreamProcessor *s_processor, 147 147 char *name, 148 enum FreebobStreaming::Port::E_Direction direction,148 enum Streaming::Port::E_Direction direction, 149 149 int position, int size); 150 150 bool addDirPorts( 151 enum FreebobStreaming::Port::E_Direction direction,151 enum Streaming::Port::E_Direction direction, 152 152 unsigned int sample_rate, unsigned int optical_mode); 153 153