| 368 | } |
| 369 | |
| 370 | unsigned MakeChannelMap(int nChannels, int channel, ChannelName map[3]) |
| 371 | { |
| 372 | assert(channel < static_cast<int>(nChannels)); // precondition |
| 373 | |
| 374 | size_t index = 0; |
| 375 | if (nChannels == 1) |
| 376 | map[index++] = ChannelNameMono; |
| 377 | else { |
| 378 | // TODO: more-than-two-channels |
| 379 | if (channel < 1) |
| 380 | map[index++] = ChannelNameFrontLeft; |
| 381 | if (channel != 0) |
| 382 | map[index++] = ChannelNameFrontRight; |
| 383 | } |
| 384 | map[index] = ChannelNameEOL; |
| 385 | return index; |
| 386 | } |
no outgoing calls
no test coverage detected