搜索
bottom↓
回复: 11

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

[复制链接]

出0入0汤圆

发表于 2011-6-4 16:14:04 | 显示全部楼层 |阅读模式
helix  mp3FrameInfo.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;
}

阿莫论坛20周年了!感谢大家的支持与爱护!!

一只鸟敢站在脆弱的枝条上歇脚,它依仗的不是枝条不会断,而是自己有翅膀,会飞。

出0入0汤圆

发表于 2011-6-4 16:51:06 | 显示全部楼层
不能, helix只支持MP3格式, 即MPEG-1 Layer 3

出0入0汤圆

 楼主| 发表于 2011-6-4 17:21:02 | 显示全部楼层
回复【1楼】cheungman  
不能, helix只支持mp3格式, 即mpeg-1 layer 3
-----------------------------------------------------------------------
但是我只降 samprate 到 22050Hz  mp3FrameInfo.version 就自动变成 1?
我使用GoldWave 与 Cool Edit 也一样??

出0入0汤圆

发表于 2011-6-4 18:09:31 | 显示全部楼层
MP3的采样率只有32, 44.1, 48KHz, 降频到22.05KHz, 已经不是MP3格式了, 具体请查阅MPEG相关文档.

出0入0汤圆

 楼主| 发表于 2011-6-4 18:26:22 | 显示全部楼层
回复【3楼】cheungman  
mp3的采样率只有32, 44.1, 48khz, 降频到22.05khz, 已经不是mp3格式了, 具体请查阅mpeg相关文档.
-----------------------------------------------------------------------
但是 helix 为什么都有这些samplerate表?

#include "mp3common.h"

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

/* indexing = [version][layer][bitrate index]
* 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[3][3][15] = {
        {
                /* 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 */
        },

出0入0汤圆

 楼主| 发表于 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

出0入0汤圆

发表于 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###

出0入0汤圆

 楼主| 发表于 2011-6-5 07:18:32 | 显示全部楼层
回复【7楼】cheungman  
我提供的是官方资料,因该没问题.
https://datatype.helixcommunity.org/Mp3dec

出0入0汤圆

发表于 2011-6-6 00:28:26 | 显示全部楼层
可能要付费吧~~~~。。
void IntensityProcMPEG1(int x[MAX_NCHAN][MAX_NSAMP], int nSamps, FrameHeader *fh, ScaleFactorInfoSub *sfis,
                                                CriticalBandInfo *cbi, int midSideFlag, int mixFlag, int mOut[2]);
void IntensityProcMPEG2(int x[MAX_NCHAN][MAX_NSAMP], int nSamps, FrameHeader *fh, ScaleFactorInfoSub *sfis,
                                                CriticalBandInfo *cbi, ScaleFactorJS *sfjs, int midSideFlag, int mixFlag, int mOut[2]);

出0入0汤圆

发表于 2011-6-22 08:26:23 | 显示全部楼层
回复【3楼】cheungman
mp3的采样率只有32, 44.1, 48khz, 降频到22.05khz, 已经不是mp3格式了, 具体请查阅mpeg相关文档.
-----------------------------------------------------------------------

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

出0入0汤圆

发表于 2016-1-21 13:24:42 | 显示全部楼层
我现在使用helix解码8K采样率的音频,同个文件中有部分帧解出来数据是错的,但有的文件又全部正常,有人遇到过这个问题吗?
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-3-29 18:13

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表