B4A Library Audio library v1.5 - New AudioStreamer object

Status
Not open for further replies.

freedom2000

Well-Known Member
Licensed User
Longtime User
Not too much. See the first post.

Hi again,

I tested the 1.62 library

1) the App no longer crashes when the audio stream is already booked by another app
2) however I don't know how to trap the added event ?
3) I also tested the various sources with the intialize2 method

only DEFAULT and MIC seem to work on my Nexus 5 kitkat 4.4.2
all the other options raise an exception when startrecording occurs
 

freedom2000

Well-Known Member
Licensed User
Longtime User
You can handle it with:
B4X:
Sub streamer_Error
Log(LastException)
End Sub

3) Can you post the error message?
So I logged the last exception and I got :

(IllegalStateException) java.lang.IllegalStateException: startRecording() called on an uninitialized AudioRecord.

the init itself does not raise an exception
 

danielt

New Member
Licensed User
Longtime User
So I logged the last exception and I got :

(IllegalStateException) java.lang.IllegalStateException: startRecording() called on an uninitialized AudioRecord.

the init itself does not raise an exception

Hi Erel and co. Just wondering if anyone has a solution for this? I'm also hoping to use a Bluetooth headset microphone as the input.

I get the same exception if I try to use VOICE_UPLINK (2) for example. DEFAULT and MIC work fine.
 

brelto85

Active Member
Licensed User
Longtime User
with the version 1.62, is possible to set the AudioSource to VOICE_RECOGNITION and record/handle the voice in alternative to SpeechRecognizer library?
If so, has a sense to do?
 

freedom2000

Well-Known Member
Licensed User
Longtime User
Make sure to use the latest Audio library as it allows you to handle this error instead of crashing.

This error means that Android failed to open this channel. There isn't much that can be done about it.
I can confirm that the 1.62 version of the lib handles properly this exception

And that it is really dependant on the device you are using, some accept more audio channels than others... That's life !
 

DRSolomon

New Member
Licensed User
Longtime User
Greetings people,

Working with the videorecord aspect and all is well, however I need to be able to turn the flash of programmatically..... Anyone got a snippet for me in this regard please..... Any working example?
I'm also looking for a means to get the ambient light level from the light sensor on the phone, any ideas?

Many thanks
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…