51 |
if (engines.count(pDevice)) { |
if (engines.count(pDevice)) { |
52 |
dmsg(4,("Using existing gig::Engine.\n")); |
dmsg(4,("Using existing gig::Engine.\n")); |
53 |
pEngine = engines[pDevice]; |
pEngine = engines[pDevice]; |
54 |
|
|
55 |
|
// Disable the engine while the new engine channel is |
56 |
|
// added and initialized. The engine will be enabled again |
57 |
|
// in EngineChannel::Connect. |
58 |
|
pEngine->DisableAndLock(); |
59 |
} else { // create a new engine (and disk thread) instance for the given audio output device |
} else { // create a new engine (and disk thread) instance for the given audio output device |
60 |
dmsg(4,("Creating new gig::Engine.\n")); |
dmsg(4,("Creating new gig::Engine.\n")); |
61 |
pEngine = (Engine*) EngineFactory::Create("gig"); |
pEngine = (Engine*) EngineFactory::Create("gig"); |
62 |
pEngine->Connect(pDevice); |
pEngine->Connect(pDevice); |
63 |
engines[pDevice] = pEngine; |
engines[pDevice] = pEngine; |
64 |
} |
} |
|
|
|
65 |
// register engine channel to the engine instance |
// register engine channel to the engine instance |
|
|
|
|
// Disable the engine while the new engine channel is added |
|
|
// and initialized. The engine will be enabled again in |
|
|
// EngineChannel::Connect. |
|
|
pEngine->DisableAndLock(); |
|
|
|
|
66 |
pEngine->engineChannels.add(pChannel); |
pEngine->engineChannels.add(pChannel); |
67 |
// remember index in the ArrayList |
// remember index in the ArrayList |
68 |
pChannel->iEngineIndexSelf = pEngine->engineChannels.size() - 1; |
pChannel->iEngineIndexSelf = pEngine->engineChannels.size() - 1; |
1692 |
} |
} |
1693 |
|
|
1694 |
String Engine::Version() { |
String Engine::Version() { |
1695 |
String s = "$Revision: 1.71 $"; |
String s = "$Revision: 1.72 $"; |
1696 |
return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword |
return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword |
1697 |
} |
} |
1698 |
|
|