176 | | // snooping does not make sense for a slave device |
---|
177 | | setOption("snoopMode", false); |
---|
178 | | |
---|
179 | | // prepare the base class |
---|
180 | | // FIXME: when doing proper discovery this won't work anymore |
---|
181 | | // as it relies on a completely symmetric transmit/receive |
---|
182 | | if(!BounceDevice::prepare()) { |
---|
183 | | debugError("Base class preparation failed\n"); |
---|
184 | | return false; |
---|
185 | | } |
---|
186 | | |
---|
187 | | // do any customisations here |
---|
188 | | |
---|
| 178 | debugOutput(DEBUG_LEVEL_NORMAL, "Preparing BounceSlaveDevice...\n" ); |
---|
| 179 | |
---|
| 180 | // create & add streamprocessors |
---|
| 181 | Streaming::StreamProcessor *p; |
---|
| 182 | |
---|
| 183 | p=new Streaming::AmdtpSlaveReceiveStreamProcessor( |
---|
| 184 | m_p1394Service->getPort(), |
---|
| 185 | m_samplerate, |
---|
| 186 | BOUNCE_NB_AUDIO_CHANNELS); |
---|
| 187 | |
---|
| 188 | if(!p->init()) { |
---|
| 189 | debugFatal("Could not initialize receive processor!\n"); |
---|
| 190 | delete p; |
---|
| 191 | return false; |
---|
| 192 | } |
---|
| 193 | |
---|
| 194 | if (!addPortsToProcessor(p, |
---|
| 195 | Streaming::Port::E_Capture)) { |
---|
| 196 | debugFatal("Could not add plug to processor!\n"); |
---|
| 197 | delete p; |
---|
| 198 | return false; |
---|
| 199 | } |
---|
| 200 | |
---|
| 201 | m_receiveProcessors.push_back(p); |
---|
| 202 | |
---|
| 203 | // do the transmit processor |
---|
| 204 | p=new Streaming::AmdtpSlaveTransmitStreamProcessor( |
---|
| 205 | m_p1394Service->getPort(), |
---|
| 206 | m_samplerate, |
---|
| 207 | BOUNCE_NB_AUDIO_CHANNELS); |
---|
| 208 | |
---|
| 209 | if(!p->init()) { |
---|
| 210 | debugFatal("Could not initialize transmit processor!\n"); |
---|
| 211 | delete p; |
---|
| 212 | return false; |
---|
| 213 | } |
---|
| 214 | |
---|
| 215 | if (!addPortsToProcessor(p, |
---|
| 216 | Streaming::Port::E_Playback)) { |
---|
| 217 | debugFatal("Could not add plug to processor!\n"); |
---|
| 218 | delete p; |
---|
| 219 | return false; |
---|
| 220 | } |
---|
| 221 | m_transmitProcessors.push_back(p); |
---|
| 222 | |
---|