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

Java Development

Reply
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon
Accepted Solution

Audio Curiosity

I'm planning out some projects and was looking through the JavaDocs and noticed one thing and had an idea for another:

  1. Custom audio format: Is it possible (yes I know it might not be fast) to add an audio format by wrapping the audio stream and converting it to a supported format on the fly?
  2. VoIP mode: I was looking at the 6.0 API docs for javax.microedition.media.Manager and it mentions VoIP mode. Has anyone used this? Any idea if this is a 6.0 and up feature or does it work on 5.0 and lower?
---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Audio Curiosity

Ok, so based on http://supportforums.blackberry.com/t5/Java-Development/voipMode-true/td-p/981427 VoIP mode doesn't work (at least not now).

 

So, as for the other question, does anyone know if it is possible to "add" support for other audio formats (as stated in the previous post)?

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
Developer
Aviator168
Posts: 709
Registered: ‎09-10-2009
My Device: 8520, 8900, 9000, 9300, 9650, 9700, 9780, 9800, 9810, 9900, 9930
My Carrier: Verizon

Re: Audio Curiosity

voipmode works. It allows CMDA phones running OSv6 be able to do duplex audio.

Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Audio Curiosity

So I saw in your thread on it.

 

Now to know if it's possible to implement an unsupported audio format with the built in Player (instead of writing my own player).

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
Trusted Contributor
KraKra
Posts: 224
Registered: ‎08-11-2010
My Device: Not Specified

Re: Audio Curiosity

>  to add an audio format by wrapping the audio stream and converting it to a supported format on the fly?

 

yes, you can use whatever internal format  you want to transfer the audio data, all you need to do is to convert it to "known" format before providing the audio data to the player.

Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Audio Curiosity

That's what I thought. I assume this would be done within a DataSource?

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
Trusted Contributor
KraKra
Posts: 224
Registered: ‎08-11-2010
My Device: Not Specified

Re: Audio Curiosity

>  I assume this would be done within a DataSource?

 

I have used my own implementation of InputStream, which I beileve is simpler approach.  

Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Audio Curiosity

[ Edited ]

InputStream would definitly be easier but DataSource would offer more "options" such as seeking and would be more managable when dealing with different content types and sources.

 

The way I look at it is (for something like streaming):

InputStream: Open input stream, read data (block until enough data has buffered, provide data), do all cleanup in close function

DataSource: Create data source, Connect (start buffering data), Start (provide data), Stop (stop providing data but continue to buffer if more data is avalible), Disconnect (stop buffering, close streams, free buffers).

 

I like options so knowing it would work with an InputStream is good to know. Thank you.

 

EDIT: I'll mark this as the solution since my questions where anwsered by 2 different people.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
Developer
Aviator168
Posts: 709
Registered: ‎09-10-2009
My Device: 8520, 8900, 9000, 9300, 9650, 9700, 9780, 9800, 9810, 9900, 9930
My Carrier: Verizon

Re: Audio Curiosity

Yes. Using input stream is easier. However, some BB device does not work with InputStream player. Just find that out the other day on the 8520. Don't know what the reason is. DataSource does work though.

Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Audio Curiosity

Another vote for DataSource, plan on doing some work for another one of my libraries.
---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.