简体   繁体   English

将数据原样发送到Xamarin.Forms中的音频设备

[英]Send the data as-is to the audio device in Xamarin.Forms

I have a custom Audio DAC device. 我有一个自定义音频DAC设备。 I can connect it with Android/iOS smartphone by OTG cable. 我可以通过OTG电缆将其与Android / iOS智能手机连接。 The main question is how to supply byte stream audio to the my device? 主要问题是如何向我的设备提供字节流音频?
In UWP application I'm using NAdio which provides wrapper for WASAPI with exclusive mode access. 在UWP应用程序中,我使用的是NAdio ,它为WASAPI提供了具有独占模式访问的包装。 I don't need to resample my generated data in bytes or mix them with system sounds and sounds from other apps. 我不需要以字节为单位重新采样生成的数据,也不需要将它们与系统声音和其他应用程序的声音混合在一起。

Is it possible to reach my goal for mobile devices? 是否有可能达到我的移动设备目标?
Thanks in advance! 提前致谢!

I don't need to resample my generated data in bytes or mix them with system sounds and sounds from other apps. 我不需要以字节为单位重新采样生成的数据,也不需要将它们与系统声音和其他应用程序的声音混合在一起。

Is it possible to reach my goal for mobile devices? 是否有可能达到我的移动设备目标?

If your goal is to send audio data to your DAC device without resample and mix. 如果您的目标是将音频数据发送到DAC设备而无需重新采样和混合。 The answer is no for android. 答案是否定的。 I don't know if there is any third party library for automatically convert your audio data. 我不知道是否有任何第三方库可以自动转换您的音频数据。 But officially, you need to use native lib like AAudio to conduct your audio data. 但是正式地,您需要使用本机库(例如AAudio)来处理音频数据。 You can also refer to Best Practices for Android Audio . 您也可以参考Android音频最佳做法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM