音频输入至Android智能手机通过耳机插孔? [英] Audio input to android smartphone through headphone jack?

查看:1781
本文介绍了音频输入至Android智能手机通过耳机插孔?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过音频耳机插孔从外部播放器传递到Android手机。我有理由相信这可以有两个原因来完成:

I'm trying to pass audio into an android phone through the headphone jack from an external player. I am reasonably sure it can be done for two reasons:

1)的平方读卡器的工作原理是通过耳机插孔发送其信息,所以它可以处理信息的输入。 https://squareup.com/reader 结果
2)为了得到从播放机到电话的音频,我将使用一个正常辅助-辅助电缆,类似于用于连接的音乐播放器到扬声器。的事实,即音频可以通过一个简单的两环电缆被传递给扬声器。我通常都知道这两个环仅用于与输入第三环输出,但在我看来,这将表明他们能够在不三环输入的。

1) The square card reader works by sending its information through the headphone jack, so it can handle information input. https://squareup.com/reader
2) In order to get the audio from the player to the phone, I will be using a normal aux-aux cable, similar to those used connecting a music player to speakers. The fact that the audio can be passed to the speakers through a simple two ring cable. I know usually the two rings are used only for output with a third ring for input, but it seems to me this would suggest they are capable of inputting without the third ring.

我的问题是,似乎没有被任何API,可以通过耳机插孔来处理输入,似乎没有人知道方​​读者如何工作的,或与输入的交易。它看起来像AudioRecord, http://developer.android.com/reference/android/媒体/ AudioRecord.html ,可能有一些潜在的工作,但它似乎需要可以提前指定的大小,这是不理想的。

My problem is there doesn't seem to be any api to deal with input through the headphone jack, and no one seems to know how the square reader works, or deals with the input. It looks like AudioRecord, http://developer.android.com/reference/android/media/AudioRecord.html, could have some potential to work, but it seems to need the size to be specified ahead of time, which is not ideal.

所以,如果有人可以帮助我与AudioRecord的任何信息,以及它如何工作的,或处理输入的另一种方式,我AP preciate它。此外,如果有人确切地知道,如果我在思考这两个环形电缆可以对付输入正确的,这也将有很大的帮助。谢谢你。

So if anyone could help me with any information on AudioRecord and how it works, or an alternative way of dealing with the input, I'd appreciate it. Also if someone knows for sure if I am correct in thinking the two ring cable can deal with input, that would also help a lot. Thanks.

推荐答案

SquareUp由北街实验室<拆卸/一>是一个很好的参考点来了解SquareUp阅读器的设计。

SquareUp teardown by North Street Labs is a good point of reference to understand the design of the SquareUp reader.

录音随着智能手机会提供一些​​线索在耳机环和它们的配置。

Audio Recording With a Smartphone will shed some light on the headphone rings and their configuration.

BrandonLW的GitHub的源$ C ​​$ C 提供Android源$ C ​​$ C录制和德code中的声音数据。

BrandonLW's GitHub source code provides the Android source code to record and decode the sound data.

心连心

这篇关于音频输入至Android智能手机通过耳机插孔?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆