音频文件:仅通过一个扬声器播放数据?

发布于 2024-10-20 17:51:22 字数 457 浏览 3 评论 0原文

我正在开发一个进行扬声器测试的简单应用程序。它旨在首先在左扬声器上播放,然后在右扬声器上播放(或根据选择)。由于无法直接实现它,因此我尝试覆盖备用字节。我在十六进制编辑器中查看,字节以交替对(2 个字节)重复。当进行覆盖处理时,它仍然在两个扬声器中播放声音。

我目前正在使用

16 位签名小端

我做错了什么吗?

这些是我在录制声音时可以使用的可用格式:

Unsigned 8-bit samples 
Signed 8-bit samples
Unsigned 16-bit little-endian samples
Unsigned 16-bit big-endian samples
Signed 16-bit little-endian samples
Signed 16-bit big-endian samples

I am working on a simple application which does speaker test. It is intended to first play on the Left Speaker then on Right one (or based on selection). As there is no way of achieving it directly, I am trying to overwrite alternate bytes. I checked out in Hex Editor, and bytes are do repeating in alternate pairs (2 bytes). When worked out with overwriting, it is still playing sound in both speakers.

I am currently using

16 bit signed Little Endian

Am I doing something wrong?

These are the available formats I can use while recording the sound:

Unsigned 8-bit samples 
Signed 8-bit samples
Unsigned 16-bit little-endian samples
Unsigned 16-bit big-endian samples
Signed 16-bit little-endian samples
Signed 16-bit big-endian samples

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一萌ing 2024-10-27 17:51:22

我认为您想研究使用 AUPannerUnit 或 aupn,它控制左右立体声通道。应该有一个有用的 AUPannerUnits.txt 教程文件。

来源:Apple Audio Unit 文档

I think that you want to look into using AUPannerUnit, or aupn, which controls the left and right stereo channels. There should be an AUPannerUnits.txt tutorial file that is helpful.

Source: Apple Audio Unit Documentation

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文