diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-08-15 10:53:52 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-08-15 10:53:52 +0200 |
commit | 8622c1cdd7e9b84f0ea0fb014d576dc311ca3b7e (patch) | |
tree | 1451dc9d343305fe6ec6705702521202176b76b2 | |
parent | 0b107cb2282bbc6d11ecd2e6e7e9c45885f20bfb (diff) |
fixed m4a aac samplerate
-rw-r--r-- | plugins/aac/aac.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/aac/aac.c b/plugins/aac/aac.c index 8f7bfcad..ad76f45f 100644 --- a/plugins/aac/aac.c +++ b/plugins/aac/aac.c @@ -313,12 +313,13 @@ aac_init (DB_fileinfo_t *_info, DB_playItem_t *it) { break; } } + trace ("mp4 probe-buffer size: %d\n", buff_size); if (i != ntracks && buff) { trace ("mp4 track: %d\n", i); - samplerate = mp4ff_get_sample_rate (info->mp4file, i); - channels = mp4ff_get_channel_count (info->mp4file, i); +// samplerate = mp4ff_get_sample_rate (info->mp4file, i); +// channels = mp4ff_get_channel_count (info->mp4file, i); int samples = mp4ff_num_samples(info->mp4file, i); trace ("mp4 nsamples=%d, samplerate=%d\n", samples * 1024, samplerate); duration = (float)samples * 1024 / samplerate; @@ -334,6 +335,11 @@ aac_init (DB_fileinfo_t *_info, DB_playItem_t *it) { return -1; } info->faad_channels = ch; + samplerate = srate; + channels = ch; + NeAACDecConfigurationPtr conf = NeAACDecGetCurrentConfiguration (info->dec); + conf->dontUpSampleImplicitSBR = 1; + NeAACDecSetConfiguration (info->dec, conf); mp4AudioSpecificConfig mp4ASC; if (NeAACDecAudioSpecificConfig(buff, buff_size, &mp4ASC) >= 0) { @@ -396,6 +402,9 @@ aac_init (DB_fileinfo_t *_info, DB_playItem_t *it) { _info->plugin = &plugin; if (!info->mp4file) { + //trace ("NeAACDecGetCapabilities\n"); + //unsigned long caps = NeAACDecGetCapabilities(); + trace ("NeAACDecOpen\n"); info->dec = NeAACDecOpen (); |