Transcoding and then playing the converted audio data

I want to convert a wav file (in form of a byte array) from one encoding to another using Processor, and then play the converted result (in form of a byte array).
On a high level, I know I need to create a PullBufferDataSource as input, create a Processor using Manager and the PullBufferDataSource, program the processor, get the output DataSource, which is of type RawBufferMux$RawBufferDataSource.
My question is:
a. How do I play the RawBufferDataSource object using a Player object? or I shouldn't end up with a RawBufferDataSource object?
b. I noticed that Player and Processor classes perform their operations using multiple threads. How do I know what operations are always done in a different thread? Is there any documentation regarding this?
Thanks.
Edited by: ychenx on Jul 8, 2009 7:43 PM

a. How do I play the RawBufferDataSource object using a Player object? or I shouldn't end up with a RawBufferDataSource object?Ummmm, you should just be able to hand it to a Player object.
Player pl = Manager.createPlayer(proc.getDataOutput());If that doesn't work, then you probably havn't set the format object of your input DataSource correctly.
b. I noticed that Player and Processor classes perform their operations using multiple threads. How do I know what operations are always done in a different thread? Is there any documentation regarding this?Why do you need to know?
And no, I don't think there's any documentation on it...

Similar Messages

  • Using CAN bus to transport and play the stream audio data

    hello,
    Just want to build a PC-Based control network using CAN bus (Ethernet not considered).The system is separated two parts , one is the front unit(FU), and the other is the centeral unit(CU). FU performs dialing-up number to the CU , and play the stream audio media data come from CU, CU monitor the telephone call activated from FU's user , send rm or mp3 data to the FU . I'd like to know if CAN bus could realize this function? if it can , which hardware must be supplied ? Is there any suggestion that not use PBX to realize the voice (telphone) communication ? Please give an solution , your advise is greatly appreciated . Thanks.
    David

    Hi David,
    the CAN protocol essentially just gives you the ability to transfer (broadcast) up to eight data bytes across the network at a maximum data rate of 1 Mbit/s.
    There are so-called higher level (or layer) protocols that further specify the data exchange between a data producer can the consumer (DeviceNet, CANopen, etc.).
    If your application is not tied to any of those protocols, that means you have the freedom to design all (CAN) nodes of your network, you can implement your own protocol based on the eight data bytes and the arbitration ID CAN offers.
    For more information on the CAN protocol, take a look at appendix B of the NI-CAN Hardware and Software Manual, or visit the web site of CAN in Automation (CiA).
    For your particular application you would need a CAN port on both the FU and the CU (preferably high-speed physical layer) and a PCI interface CAN card for you development.
    -B2k

  • Search the registry for a Value, and then use the Value's data

    Hoping someone here can help me. I am attempting to find a binary value in the registry and I am having no luck so far. 
    Here is what I currently have:
    $key = "HKCU:\software\microsoft\office\15.0\Outlook\Profiles\Outlook"
    Get-ChildItem $key -rec -ea SilentlyContinue | foreach {
    $CurrentKey = (Get-ItemProperty -Path $_.PsPath -ErrorAction SilentlyContinue)
    if ($CurrentKey -match "001f6700") {
    $data = $CurrentKey.PSPath
    $data2 = Get-ItemProperty -Path . -Name "001f6700"
    echo $data2
    # $data3 = [Text.Encoding]::ASCII.getString($data2)
    echo $data3

    Finally got it working with this code:
    $x = Get-ChildItem HKCU:\software\microsoft\office -rec -ea SilentlyContinue |
    Where-Object {(Get-ItemProperty -path $_.PSPath) -match "001f6700"} |
    select -Property Property, Name, PSPath
    $y = Get-ItemPropertyValue -Path $X.PSPath -Name 001f6700
    for($i = 0; $i -clt $x.Count; $i++)
    [Text.Encoding]::unicode.getString($y[$i].syncroot)
    credit goes to a Mr. Nowacki

  • If I have 2 TVs at home and want to buy 2 apple TVs to connect my current TVs, can I use 1 new iPad and then play the movies on the 2 apple TVs at the same time?

    as title...

    iWork is universal, so it will work full-res on the iPad. This is true for any app which has the plus sign symbol (in the App Store in iTunes it will say "This app is designed for iPhone and iPad".
    Matt

  • My ipod starts voicing song data, artist data, and playlist data while I am listening to music.  Is this a feature or a defect?  I do not know why it occurs, but the only way to stop it is to stop the music then play the playlist again.

    My ipod starts voicing song data, artist data, and playlist data while I am listening to music.  Is this a feature or a defect?  I do not know why it occurs, but the only way to stop it is to stop the music then play the playlist again.

    To make sure voiceover is off, you need to go to summary screen then click the "Configure Universal Access" button. Then you will get a dialog where you can make sure voiceover is off. All of the boxes in the dialog should be unchecked.
    i

  • My MacBook Pro 10.6.8 prompted me of a new itunes update this morning, so i downloaded it. Since then itunes has been starting up randomly on its own, and starts playing the first song on the list. I quit itunes, and it keeps reopening.

    My MacBook Pro 10.6.8 prompted me of a new itunes update this morning, so i downloaded it. Since then itunes has been starting up randomly on its own, and starts playing the first song on the list. I pause the song, and it resumes it on its own again. I'm not joking. So, I end up quiting out of itunes; but, it starts right back up again on its own. After quiting out of the app a few times, it eventually stops reopening; however, about an hour later (or less) it opens again. HOW DO I MAKE IT STOP? I'm just about to delete itunes, because I've had enough of this crap. I hope someone can help. I've restarted the laptop, and it seemed like that fixed it, then itunes started up doing the same thing again an hour later. ituneshelper is unchecked; bluetooth is off; i only have speakers and a mouse plugged in (also charger).

    Read this Apple Discussion Thread and possible solutions. The audio jack has been the main culprit, also certain sync and automation settings including connected remotes.

  • I uploaded 3 audiobooks from iTunes to my iPhone 5 with the latest ios7 on it. Each of them only plays the first 15 mins of the playback and then silence, the bar shows the book is still playing but no sound, any ideas? Thanks

    I uploaded 3 audiobooks from iTunes to my iPhone 5 with the latest ios7 on it. Each of them only plays the first 15 mins of the playback and then silence, the bar shows the book is still playing but no sound, any ideas? Thanks

    What happens when playing the same books in iTunes. Is there sound after 15 min?
    If also silent in iTunes, check the info tab where you can see the item is an audiobook, etc. Check the volume bar, this normally is on the zero point.
    When an audio book is really low in audio, I tend to move this to the plus side (+1=max), but for some strange reason this bar was at -1 in some books I had and they also seemed to play in absolute silence.

  • When i play back an mp3 dj mix i,ve burn,t to cd in my car when i turn the engine of and then restart the car the cd starts back from the beginning how do i solve this problem so that when i turn the engine on end off the cd plays from the same place

    when i play back an mp3 dj mix i,ve burn,t to cd in my car when i turn the engine of and then restart the car the cd starts back from the beginning how do i solve this problem so that when i turn the engine on end off the cd plays from the same place it did before i turned the engine off

    It could be that the CD player will only playback "Redbook" CD's from the previous position.
    And starts mp3 type CD's from the beginnig.
    However.. it's not Logic related.
    pancenter-

  • I backed up my iphone 4 s and then did the up date now i have no contacts how do i get them back

    i backed up my iphone 4 s and then did the up date now i have no contacts how do i get them back?

    Try logging into icloud.comwith you're apple id and see if you're contacts are there.
    Hope this helps

  • How can I move (copy) my Time Capsule date to a new 2T hard drive and then wipe the TC and start as a new (clean) Time MACHINE backup?

    How can I move (copy) my Time Capsule date to a new 2T hard drive and then wipe the TC and start as a new (clean) Time MACHINE backup?

    Just use the archive utility on the disk page of the airport utility manual setup..
    If you have lion and v6 airport utility.. it missed out. On lots of things.
    Download and install the real.. UTILITY
    5.6 http://support.apple.com/kb/DL1482

  • How can i hold a spot in a clip, let the audio continue for a moment and then resume the clip and audio together?

    how can i hold a spot in a clip, let the audio continue for a moment and then resume the clip and audio together?

    you want to use the retiming tool. you can select what you want to hold, then use the "Hold" command (shift-H) to create a single frame of a default duration, which you can then change to whatever length you want by dragging the retiming handle.
    Here's the page in the help manual that describes the hold feature in detail:
    http://help.apple.com/finalcutpro/mac/10.0/#ver4c2173c9

  • Iphone 5 stuck on connect to itunes screen- if i try and get it out of recovery mode it trys to extract the data and then says the phones memory is full

    iphone 5 stuck on connect to itunes screen- if i try and get it out of recovery mode via itunes,  it trys to extract the data and then says the phones memory is full- cant seem to get it sorted, any ideas? I have an ipad mini if that helps?!

    Hey craigfromsheffield,
    I would suggest that you use the following information in order to help you resolve this issue:
    If you can't update or restore your iOS device
    http://support.apple.com/kb/HT1808
    Thanks for using the Apple Support Communities!
    Cheers,
    Braden

  • How can I copy picture on a CD and then play them on the blue ray player on my TV?

    How can I copy pictures from iphoto on a CD then play it on my blueray player on the TV?

    You are attempting to do this in a very difficult manner. Why not simply get an AppleTV ($75 refurbished from Apple) and you can share all your iPhoto content on your TV. That would be much easier than exporting to a CD/DVD, loading it into a player and then playing from a DVD. Apple tells about setting up Home Sharing in http://support.apple.com/kb/ht4352.

  • How do you play a Flash video and then close the player?

    I have a splash page that plays a .swf. At the end of the
    video the home.html page is opened. As/after the home page launches
    I want to play a Flash video and then have the player close.
    I am willing to trade wife, children or beagles for the info.

    Are these two separate browser windows? One for the Flash
    .swf and a different window for the home.html document? Is this
    correct:
    1. show .swf in one window,
    2. open new, second, window with home.html
    3. show second .swf in first window
    4. close first window when second .swf finishes
    If this is the scenario, then no, you can't reliably close
    the first window. You can use Javascript to close a browser window,
    but, if that window wasn't opened using Javascript, then it may not
    close gracefully, or in the case of IE, may display a prominent
    error message.

  • I'm having problems with the install of iTunes 10.7 it seems to be going well and then at the very end of the blue bar it doesnt seem to complete? All of my software is up to date and plenty of space on the mini?

    I'm having problems installing iTunes 10.7. It seems to be going well and then at the last part of the blue bar it just doesn't complete. All software is up to date and there is plen of room on the mini? I have tried like 4 times and am ready to throw it out the window.

    I noticed some problems with the Apple Support sites here the last day or so.
    Try again using > Apple - iTunes - Download iTunes Now

Maybe you are looking for

  • Problems with java + MQSeries 5.2

    Right, so here's the scenario. I have an MQ 5.2 server sitting in a server room, not on any windows domain. I can connect to this machine fine from my development box, which is running the 5.0 MQ Series client. (Note that my machine appears to have n

  • Blank entry removed from af:selectOneChoice drop down on valueChangeListene

    I am using af:selectOneChoice component which is getting populated with values from DB. when the page is loaded first time, I can see one blank entry in this component. I have valueChangeListener set on this. when i change the value, the blank entry

  • Firefox only prints one page

    Firefox will only print the fist page of anything I try to print from any web site (inc. this web site!!). It has worked perfectly in the past. I am now on Firefox 3.6.3. Please help. == This happened == Every time Firefox opened

  • Active Directory Cached Domain Login question

    Hi all, I would like to seek assistance on the following scenario setup where I have 2 independent AD forest setup Production Forest #1 - Contoso Test Lab Forest #2 - Contoso Assuming both AD forests domain controllers are issued with Domain Controll

  • Please connect your iphone to a computer running itunes

    I have a new phone and it keeps saying "please connect your iphone to a computer running itunes...etc. But I have it hooked to a computer using Itunes