This file looks large and may slow your browser down if we attempt
to syntax highlight it, so we are showing it without any
pretty colors.
Highlight
it anyway.
| 1 |
/* |
| 2 |
* Copyright 2011 Various Authors |
| 3 |
* Copyright 2011 Johannes Weißl |
| 4 |
* |
| 5 |
* This program is free software; you can redistribute it and/or |
| 6 |
* modify it under the terms of the GNU General Public License as |
| 7 |
* published by the Free Software Foundation; either version 2 of the |
| 8 |
* License, or (at your option) any later version. |
| 9 |
* |
| 10 |
* This program is distributed in the hope that it will be useful, but |
| 11 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
* General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU General Public License |
| 16 |
* along with this program; if not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
#ifndef _AAC_H |
| 20 |
#define _AAC_H |
| 21 |
|
| 22 |
#include "channelmap.h" |
| 23 |
#include <neaacdec.h> |
| 24 |
|
| 25 |
static inline channel_position_t channel_position_aac(unsigned char c) |
| 26 |
{ |
| 27 |
switch (c) { |
| 28 |
case FRONT_CHANNEL_CENTER: return CHANNEL_POSITION_FRONT_CENTER; |
| 29 |
case FRONT_CHANNEL_LEFT: return CHANNEL_POSITION_FRONT_LEFT; |
| 30 |
case FRONT_CHANNEL_RIGHT: return CHANNEL_POSITION_FRONT_RIGHT; |
| 31 |
case SIDE_CHANNEL_LEFT: return CHANNEL_POSITION_SIDE_LEFT; |
| 32 |
case SIDE_CHANNEL_RIGHT: return CHANNEL_POSITION_SIDE_RIGHT; |
| 33 |
case BACK_CHANNEL_LEFT: return CHANNEL_POSITION_REAR_LEFT; |
| 34 |
case BACK_CHANNEL_RIGHT: return CHANNEL_POSITION_REAR_RIGHT; |
| 35 |
case BACK_CHANNEL_CENTER: return CHANNEL_POSITION_REAR_CENTER; |
| 36 |
case LFE_CHANNEL: return CHANNEL_POSITION_LFE; |
| 37 |
default: return CHANNEL_POSITION_INVALID; |
| 38 |
} |
| 39 |
} |
| 40 |
|
| 41 |
#endif |