Lines Matching refs:channel

96 		// all the cached values are 0.0 for a new channel
125 TRACE("UpdateOutputChannels: output channel %d, type %2d, gain %.3f\n", i, fOutputChannelInfo[i].channel_type, fOutputChannelInfo[i].channel_gain);
138 // we have only one phycial output channel, and use it as a mix of
140 TRACE("AssignDefaultSources: 1 channel setup\n");
162 TRACE("AssignDefaultSources: 2 channel setup\n");
163 // left channel:
177 // right channel:
192 TRACE("AssignDefaultSources: 4 channel setup\n");
193 // left channel:
205 // right channel:
217 // rear-left channel:
227 // rear-right channel:
238 TRACE("AssignDefaultSources: 5 channel setup\n");
239 // left channel:
249 // right channel:
259 // rear-left channel:
269 // rear-right channel:
279 // center channel:
288 TRACE("AssignDefaultSources: no default setup, adding mono channel to first two channels\n");
290 // this is not a left channel, but we add the mono channel anyway
296 // this is not a right channel, but we add the mono channel anyway
305 TRACE("AssignDefaultSources: output channel %d, source index %d: source_type %2d, source_gain %.3f\n", i, j, fOutputChannelInfo[i].source_type[j], fOutputChannelInfo[i].source_gain[j]);
312 MixerOutput::GetOutputChannelType(int channel)
314 if (channel < 0 || channel >= fOutputChannelCount)
316 return fOutputChannelInfo[channel].channel_type;
321 MixerOutput::SetOutputChannelGain(int channel, float gain)
323 TRACE("SetOutputChannelGain chan %d, gain %.5f\n", channel, gain);
324 if (channel < 0 || channel >= fOutputChannelCount)
326 fOutputChannelInfo[channel].channel_gain = gain;
331 MixerOutput::AddOutputChannelSource(int channel, int source_type)
333 if (channel < 0 || channel >= fOutputChannelCount)
337 if (fOutputChannelInfo[channel].source_count == MAX_SOURCE_ENTRIES)
339 for (int i = 0; i < fOutputChannelInfo[channel].source_count; i++) {
340 if (fOutputChannelInfo[channel].source_type[i] == source_type)
344 float source_gain = fOutputChannelInfo[channel].source_gain_cache[source_type];
345 fOutputChannelInfo[channel].source_type[fOutputChannelInfo[channel].source_count] = source_type;
346 fOutputChannelInfo[channel].source_gain[fOutputChannelInfo[channel].source_count] = source_gain;
347 fOutputChannelInfo[channel].source_count++;
352 MixerOutput::RemoveOutputChannelSource(int channel, int source_type)
354 if (channel < 0 || channel >= fOutputChannelCount)
356 for (int i = 0; i < fOutputChannelInfo[channel].source_count; i++) {
357 if (fOutputChannelInfo[channel].source_type[i] == source_type) {
359 fOutputChannelInfo[channel].source_gain_cache[source_type] = fOutputChannelInfo[channel].source_gain[i];
361 fOutputChannelInfo[channel].source_type[i] = fOutputChannelInfo[channel].source_type[fOutputChannelInfo[channel].source_count - 1];
362 fOutputChannelInfo[channel].source_gain[i] = fOutputChannelInfo[channel].source_gain[fOutputChannelInfo[channel].source_count - 1];
363 fOutputChannelInfo[channel].source_count--;
371 MixerOutput::SetOutputChannelSourceGain(int channel, int source_type, float source_gain)
373 if (channel < 0 || channel >= fOutputChannelCount)
376 for (int i = 0; i < fOutputChannelInfo[channel].source_count; i++) {
377 if (fOutputChannelInfo[channel].source_type[i] == source_type) {
378 fOutputChannelInfo[channel].source_gain[i] = source_gain;
385 fOutputChannelInfo[channel].source_gain_cache[source_type] = source_gain;
390 MixerOutput::GetOutputChannelSourceGain(int channel, int source_type)
392 if (channel < 0 || channel >= fOutputChannelCount)
395 for (int i = 0; i < fOutputChannelInfo[channel].source_count; i++) {
396 if (fOutputChannelInfo[channel].source_type[i] == source_type) {
397 return fOutputChannelInfo[channel].source_gain[i];
403 return fOutputChannelInfo[channel].source_gain_cache[source_type];
408 MixerOutput::HasOutputChannelSource(int channel, int source_type)
410 if (channel < 0 || channel >= fOutputChannelCount)
412 for (int i = 0; i < fOutputChannelInfo[channel].source_count; i++) {
413 if (fOutputChannelInfo[channel].source_type[i] == source_type) {