summaryrefslogtreecommitdiffstats
path: root/audio/format.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/format.c')
-rw-r--r--audio/format.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/audio/format.c b/audio/format.c
index 08b369c090..5e83ead1b2 100644
--- a/audio/format.c
+++ b/audio/format.c
@@ -227,3 +227,16 @@ int af_format_conversion_score(int dst_format, int src_format)
score -= 2048; // has to convert float<->int
return score;
}
+
+int af_format_sample_alignment(int format)
+{
+ switch (format) {
+ case AF_FORMAT_S_AAC: return 16384;
+ case AF_FORMAT_S_AC3: return 6144;
+ case AF_FORMAT_S_DTSHD: return 32768;
+ case AF_FORMAT_S_EAC3: return 24576;
+ case AF_FORMAT_S_MP3: return 4608;
+ case AF_FORMAT_S_TRUEHD: return 61440;
+ default: return 1;
+ }
+}