澳门银河网上官方赌场_老品牌值得信赖

ITKeyword,专注技术干货聚合推荐

注册 | 登录

c++ - How to play FFMPEG sound sample with OpenAL?

itPublisher 分享于

2020腾讯云双十一活动,全年最低!!!(领取3500元代金券),
地址https://cloud.tencent.com/act/cps/redirect?redirect=1073

2020阿里云最低价产品入口,含代金券(新老用户有优惠),
地址https://www.aliyun.com/minisite/goods

up vote 2 down vote favorite I am using FFMPEG to load Audio Video from File. It works with video, but I don't know how to play audio samples. Here is my code to get audio samples: m_AdotimeBase = (int64_t(m_Adocdec_ctx->time_base.num) * AV_TIME_BASE) / int64_t(m_Adocdec_ctx->time_base.den);

if(!m_Adofmt_ctx)

{

//AfxMessageBox(L"m_timeBase");

return FALSE ;

}

int64_t seekAdoTarget = int64_t(m_currFrame) * m_AdotimeBase;

if(av_seek_frame(m_Adofmt_ctx, -1, seekAdoTarget, AVSEEK_FLAG_ANY) < 0)

{

/*CString st;

st.Format(L"%d",m_currFrame);

AfxMessageBox(L"av_seek_frame "+st);*/

m_currFrame = m_totalFrames-1;

return FALSE ;

}

if ((ret = av_read_frame(m_Adofmt_ctx, &packet)) < 0)

return FALSE;

if (packet.stream_index == 0)

{

ret = avcodec_decode_audio4(m_Adocdec_ctx, &in_AdeoFrame, &got_frame, &packet);

if (ret < 0)

{

av_free_packet(&packet);

return FALSE;

}

}

My problem is I want to listen that sample using OPENAL. I would appreciate any tutorials or references on the subject. c++ audio ffmpeg openal
  edited Mar 22 '16 at 2:19 Laurel 4,175 9 18 40 asked Apr 16 '13 at 14:18 Asim 11 3      possible duplicate of Streaming Audio with OpenAL and FFMPEG –  Cole Johnson Apr 27 '13 at 1:52



 |  Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

up vote 2 down vote favorite I am using FFMPEG to load Audio Video from File. It works with video, but I don't know how to play audio samples. Here is my code to get audio samples:

相关阅读排行


相关内容推荐

最新文章

×

×

请激活账号

为了能正常使用评论、编辑功能及以后陆续为用户提供的其他产品,请激活账号。

您的注册邮箱: 修改

重新发送激活邮件 进入我的邮箱

如果您没有收到激活邮件,请注意检查垃圾箱。

澳门银河网上官方赌场 <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <文本链> <文本链> <文本链> <文本链> <文本链> <文本链>