j-link 发表于 2011-6-4 16:14:04

helix mp3FrameInfo.version=1 无法播放??

helixmp3FrameInfo.version=1 无法播放??
如果删掉声音断断续续.........

// check if this is really a valid frame
// (the decoder does not seem to calculate CRC, so make some plausibility checks)
if (MP3GetNextFrameInfo(hMP3Decoder, &mp3FrameInfo, read_ptr) == 0 &&
mp3FrameInfo.nChans == 2 &&
mp3FrameInfo.version == 0) {
debug_printf("Found a frame at offset %x\n", offset + read_ptr - mp3buf + mp3file->fptr);
} else {
puts("this is no valid frame");
// advance data pointer
// TODO: handle bytes_left == 0
assert(bytes_left > 0);
bytes_left -= 1;
read_ptr += 1;
return 0;
}

cheungman 发表于 2011-6-4 16:51:06

不能, helix只支持MP3格式, 即MPEG-1 Layer 3

j-link 发表于 2011-6-4 17:21:02

回复【1楼】cheungman
不能, helix只支持mp3格式, 即mpeg-1 layer 3
-----------------------------------------------------------------------
但是我只降 samprate 到 22050Hzmp3FrameInfo.version 就自动变成 1?
我使用GoldWave 与 Cool Edit 也一样??

cheungman 发表于 2011-6-4 18:09:31

MP3的采样率只有32, 44.1, 48KHz, 降频到22.05KHz, 已经不是MP3格式了, 具体请查阅MPEG相关文档.

j-link 发表于 2011-6-4 18:26:22

回复【3楼】cheungman
mp3的采样率只有32, 44.1, 48khz, 降频到22.05khz, 已经不是mp3格式了, 具体请查阅mpeg相关文档.
-----------------------------------------------------------------------
但是 helix 为什么都有这些samplerate表?

#include "mp3common.h"

/* indexing =
* sample rate of frame (Hz)
*/
const int samplerateTab = {
{44100, 48000, 32000},                /* MPEG-1 */
{22050, 24000, 16000},                /* MPEG-2 */
{11025, 12000,8000},                /* MPEG-2.5 */
};

/* indexing =
* bitrate (kbps) of frame
*   - bitrate index == 0 is "free" mode (bitrate determined on the fly by
*       counting bits between successive sync words)
*/
const short bitrateTab = {
        {
                /* MPEG-1 */
                {0, 32, 64, 96,128,160,192,224,256,288,320,352,384,416,448}, /* Layer 1 */
                {0, 32, 48, 56, 64, 80, 96,112,128,160,192,224,256,320,384}, /* Layer 2 */
                {0, 32, 40, 48, 56, 64, 80, 96,112,128,160,192,224,256,320}, /* Layer 3 */
        },

j-link 发表于 2011-6-4 21:08:20

The Helix MP3 decoder provides Layer 3 support for MPEG-1, MPEG-2, and MPEG-2.5.


Key Features

    Pure 32-bit fixed-point implementation
    High-quality C reference code for porting to new platforms
    Optimized for ARM processors
    Fully reentrant and statically linkable
    Optional C++ API for compatibility with Helix clients
    Designed for high performance and low power consumption in handheld and mobile devices
    Full layer 3 support for
      MPEG1 layer 3 - sampling frequencies: 48 KHz, 44.1 KHz, 32 KHz
      MPEG2 layer 3 - sampling frequencies: 24 KHz, 22.05 KHz, 16 KHz
      MPEG2.5 layer 3 - sampling frequencies: 12 KHz, 11.025 KHz, 8 KHz
    Supports constant bitrate, variable bitrate, and free bitrate modes
    Supports mono and all stereo modes (normal stereo, joint stereo, dual-mono)
    Option to use Intel® IPP performance libraries (if available)
      Easy to link in either IPP libraries or Helix code

cheungman 发表于 2011-6-5 00:24:28

引用回复【14楼】qzhqzh
hexli只支持mp3,对ram要求小些
libmad支持mp3/mp2/mp1,支持24位pcm输出,对ram要求大些
-----------------------------------------------------------------------
链接:http://www.ourdev.cn/bbs/bbs_content.jsp?bbs_sn=4237963&bbs_page_no=1&search_mode=1&search_text=helix&bbs_id=9999###

j-link 发表于 2011-6-5 07:18:32

回复【7楼】cheungman
我提供的是官方资料,因该没问题.
https://datatype.helixcommunity.org/Mp3dec

nono2000 发表于 2011-6-6 00:28:26

可能要付费吧~~~~。。
void IntensityProcMPEG1(int x, int nSamps, FrameHeader *fh, ScaleFactorInfoSub *sfis,
                                                CriticalBandInfo *cbi, int midSideFlag, int mixFlag, int mOut);
void IntensityProcMPEG2(int x, int nSamps, FrameHeader *fh, ScaleFactorInfoSub *sfis,
                                                CriticalBandInfo *cbi, ScaleFactorJS *sfjs, int midSideFlag, int mixFlag, int mOut);

nono2000 发表于 2011-6-22 08:26:23

回复【3楼】cheungman
mp3的采样率只有32, 44.1, 48khz, 降频到22.05khz, 已经不是mp3格式了, 具体请查阅mpeg相关文档.
-----------------------------------------------------------------------

已经成功解决这个问题了 8Khz~44.1Khz 都可以播放。

aozima 发表于 2016-1-21 13:24:42

我现在使用helix解码8K采样率的音频,同个文件中有部分帧解出来数据是错的,但有的文件又全部正常,有人遇到过这个问题吗?
页: [1]
查看完整版本: helix mp3FrameInfo.version=1 无法播放??