Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
bb10H36
Posts: 57
Registered: ‎11-12-2013
My Device: Z10

Re: Wave file not playing (no sound) using OpenAl when multimedia AudioRecorder is running in a thread

Thanks, I will try using handle and let you know if it makes a diffrence but it sounds (no pun intended) like the cause.

I am just trying to use sound manager in a thread to see if that was the problem.

Developer
bb10H36
Posts: 57
Registered: ‎11-12-2013
My Device: Z10

Re: Wave file not playing (no sound) using OpenAl when multimedia AudioRecorder is running in a thread

Well, I followed your link and eventually reached lower level api's that after searching my hard drive found includes and libraries, etc. Documentation is sparse but there was more info in include files.

 

But...

 

In the sound manager executing by itself I was able to toggle the speaker on and off and confirm the mute status.

 

When sound manager is executing at same time as the recorder the mute status was always returned as  "off " even though the speaker was in fact  "muted".

 

So I am not sure where to look now.  ... Although I just had the thought that the volume might be set to  0 and not muted - I will see if I can determine if this is happening.

BlackBerry Development Advisor
RSperanza
Posts: 142
Registered: ‎03-08-2012
My Device: Z10

Re: Wave file not playing (no sound) using OpenAl when multimedia AudioRecorder is running in a thread

Hi.

 

The idea here is to try the following:

 

1. Get an audio manager instance (audio_manager_get_default_device())

2. Pass that instance to the AudioRecorder during initialization. (via the command provided to you yesterday)

3. Just after you start recording, check the audio manager for the mute status (audio_manager_get_output_mute()) and call a function to unmute the device (audio_manager_set_output_mute()).

 

In the event that doesn't help, it may be the output level functions you need to manipulate instead.

 

 

 

 

Developer
bb10H36
Posts: 57
Registered: ‎11-12-2013
My Device: Z10

Re: Wave file not playing (no sound) using OpenAl when multimedia AudioRecorder is running in a thread

I more or less had already tried what you  suggested but it doesn't work. First,  I am not sure that I get the correct handle because documnetation doesn't state if handle is an address or a subscript into a table of addresses, I say this because the speaker handle appears to be 0, a subscript pointing to first entry in table (speaker device is first in list of devices in include) or an invalid address.

 

Anyways was able to toggle mute on and off but has no effect.

 

Found using concurrency status check that speaker status is muted after recording is started by the AUDIO_TYPE_VOICE_RECORDING. - but not sure of the following:

 

1. how to use the type (is this a handle?) or use the pid returned from concurrency status

2. how to check for a concurrency change event - is it call back or do I loop forever until event occurs

3. if by chance the event occurs and I am notified   

  a). is event about to occur and I should say no and how would I do this

 b).  has event ocuured and I need to undo it somehow and how would I undo change

 

The documentation is not very clear on any of these issues and I as yet have not found an example of handling events.

BlackBerry Development Advisor
RSperanza
Posts: 142
Registered: ‎03-08-2012
My Device: Z10

Re: Wave file not playing (no sound) using OpenAl when multimedia AudioRecorder is running in a thread

That is an audio manager audio type.

 

I don't see a callback mechanism so what I would recommend is checking for mute status while capturing is underway and discard all buffers that are captured before the channels are unmuted.  Since you are using AudioRecorder, see if it has a signal that is fired before it saves the audio data and maybe you can block it from saving until you are able to unmute.

Developer
bb10H36
Posts: 57
Registered: ‎11-12-2013
My Device: Z10

Re: Wave file not playing (no sound) using OpenAl when multimedia AudioRecorder is running in a thread

Still not having any luck. Don't believe it works as indicated in documentation.

 

Documentation, first off for audio and multimedia, just goes in cirlcles without providing much if any info.

 

I cannot zero in on when mute is set. And,  I get different results from different function calls made at same time, and turning off mute status does not appear to work.  Lots of conflicting results from status checks at various points.

 

Plus there is no documentation that says mute status is actually being used. Maybe some other method is used to turn off speaker.

 

I did determine that while recording I can play sound on bluetooth devices and ear buds (at least when the device jack actually works - doesn't on my alpha c and only with fiddling on my Z10.

BlackBerry Development Advisor
RSperanza
Posts: 142
Registered: ‎03-08-2012
My Device: Z10

Re: Wave file not playing (no sound) using OpenAl when multimedia AudioRecorder is running in a thread

Hi.

 

Did you also try checking the output level functions?  They are similar to mute if lowered to zero and maybe that is what was adjusted before recording started.

Developer
bb10H36
Posts: 57
Registered: ‎11-12-2013
My Device: Z10

Re: Wave file not playing (no sound) using OpenAl when multimedia AudioRecorder is running in a thread

I checked volume, no change, if that is what you mean?

BlackBerry Development Advisor
RSperanza
Posts: 142
Registered: ‎03-08-2012
My Device: Z10

Re: Wave file not playing (no sound) using OpenAl when multimedia AudioRecorder is running in a thread

The functions I referred to may be manipulating the volume so don't worry about checking those right now.  Give me a few days to look into it for you and I will reply back with my findings. 

BlackBerry Development Advisor
RSperanza
Posts: 142
Registered: ‎03-08-2012
My Device: Z10

Re: Wave file not playing (no sound) using OpenAl when multimedia AudioRecorder is running in a thread

Sorry for the delay.  I tracked down a sample app using AudioRecorder to serve as a starting point and will attempt to recreate the issue this afternoon.  Once I can recreate the problem, I can make the adjustments necessary to find a workaround. 

 

Not sure if you are aware but I was told that AudioRecorder only records in mono, not stereo.  Does that matter?  If you would prefer stereo recording, please let me know as I will create a sample app that uses libasound or OpenAL for recording instead.