Player blocks when USB Headset disconnected during playback

I am playing a Wav file in my application & using a USB Headset to listen to the playback.
I'm observing the following behavior while doing this:
Scenario-USB headset is connected when the application starts up.
a) Am able to hear the voice on the USB headset when I play the wav file. Also, I get the visual Control Panel component for the player and add it to my application UI.
Code Segment 1:
//create player
//start playback
//player.start();
Code Segment 2:
//In controllerUpdate(ControllerEvent ce)
//for RealizeCompleteEvent
if (event instanceof RealizeCompleteEvent) {
//get the Control Panel Component for player
Component comp = player.getControlPanelComponent()
//add the component to the UI
b) javax.media.StartEvent is fired when the playback begins.
c) I then disconnect the USB Headset while playback is in progress. The saddle on the Control Panel Component slider bar pauses at it's position as soon as the headset is disconnected. Also, when this happens, no event is fired.
d) At this stage, if I try to stop the player using a Stop button on my UI, my application hangs. The stop() method called on pressing the Stop button has the following code:
Code Segment 3:
//in stop()
//stop player, close it & deallocate resources
player.stop();
player.close();
player.deallocate();
In the above steps, no exception is ever thrown nor any event fired signalling the disconnection of the device in use(headset).
I need to detect the disconnection of my USB headset & prevent the player from blocking, so that I can stop the player & release the resources in a clean way.
Any suggestions in this regard would be appreciated.
Thanks!
~thebadgrover

Hi, did you resolve your problem? I have similar problem to detect when a capture device is disconnected.

Similar Messages

  • Audio does not behave correctly when Bluetooth headset disconnects

    When a Bluetooth audio receiver disconnects, Windows reverts to another active audio connection.  However, the programs that were previously using the Bluetooth connection do not transfer to the new audio connection and reactivating the Bluetooth connection
    does not get the audio from those programs back.  
    The only way to make them work again is to close the program and reopen it.  As a gamer - this is particularly a problem when batteries die.  Usually I would just swap the batteries in 10 seconds and turn the headphones back on, however it is not
    possible due to this issue.  Exiting the game would ruin my team's experience as 5+ minutes is approximately 10% of the game's average total time.

    Hi,
    There are 3 reasons I can think out:
    1. Bluetooth driver was not released when it is disconnected suddenly, this can be caused by Bluetooth software.
    2. Audio driver can be corrupted.
    3. There is the problem on the program itself.
    I recommend you do following test:
    Open Windows media player to play music with Bluetooth headset, and then disconnect Bluetooth headset and see if the headphones can work fine with media player.
    If it works fine, the issue is on the program you run with problem. Contacting the program provider would be more helpful.
    Otherwise, it's related to Bluetooth driver or software, please try to update them from manufacturer's website to see what's going on.
    Also, please check if there is any event related to this issue in Event viewer.
    Kate Li
    TechNet Community Support

  • Short cut when loading VST effect during playback with CS6

    Hi !
    I'm a Audition CS6 user. I love this software, but I have a little problem.
    During playback in multitrack session, when I'm loading a VST effect or even an internal Auditon effect, there is, every time at this moment, a short cut of the sound.
    It's really boring and I didn't have this trouble with Audition 3.
    I have the same problem when I want to group some tracks, at this moment, during playback, the same short cut, or mute.
    I don't find any answer in the settings, have you got a solution ?
    thank you in advance and Merry Xmas !

    I don't think that it is intended that you should add effects or change the grouping whilst playback is on going. Audition has to adjust all the tracks for any delay that might be required to keep all the tracks synchronised. I suspect that it has to reload the audio buffers to take account of this which causes a brief break or mute whilst it does so. So load up any effects that you might use into the Effects Rack before you start playback. You can then switch the effects in and out of circuit hopefully without any breaks since I believe that any effects in the rack are catered for even if not active.

  • JMF Player blocked when invoking deallocate

    I am having a problem with JMF on Linux (Red Hat 7.3 and up), which doesn't appear on Windows. This occured when I attempted to shutdown a player. The player was started, I invoked stop and waited for the stop event (i.e. the player was now in prefetched state), once the player went back to the prefetched state I invoked deallocate() which hung for some period of time, sometimes minutes sometimes permanently. Dumping out the stack trace of the thread that hung gave me the following:
    "AudioStream" prio=1 tid=0x08246a08 nid=0x7b1 in Object.wait() [0x47c51000..0x47c5174c]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x66b72380> (a java.lang.Object)
         at java.lang.Object.wait(Unknown Source)
         at com.sun.media.sound.MixerSourceLine.implClose(Unknown Source)
         - locked <0x66b72380> (a java.lang.Object)
         at com.sun.media.sound.AbstractDataLine.close(Unknown Source)
         - locked <0x66988ef0> (a com.sun.media.sound.HeadspaceMixer)
         at com.sun.media.renderer.audio.device.JavaSoundOutput.dispose(JavaSoundOutput.java:94)
         at com.sun.media.renderer.audio.AudioRenderer.close(AudioRenderer.java:78)
         at com.sun.media.BasicRendererModule.abortPrefetch(BasicRendererModule.java:188)
         at com.sun.media.PlaybackEngine.abortPrefetch(PlaybackEngine.java:686)
         - locked <0x66b73288> (a com.sun.media.PlaybackEngine)
         at com.sun.media.BasicController.deallocate(BasicController.java:1161)
         at com.sun.media.BasicPlayer.abortPrefetch(BasicPlayer.java:1467)
         at com.sun.media.BasicController.deallocate(BasicController.java:1161)
         at com.mitel.mimedia_impl.DefaultMediaHandler.handleControllerEvent(DefaultMediaHandler.java:503)
         at com.mitel.mimedia_impl.DefaultMediaHandler.handleCustomRequest(DefaultMediaHandler.java:378)
         at com.mitel.mimedia_impl.CommonMediaHandler.run(CommonMediaHandler.java:277)
         at java.lang.Thread.run(Unknown Source)
    Looked like the thread was stuck in com.sun.media.sound.AbstractDataLine.close in a wait state for someone to post a nofity.

    yes, please give us the stack trace.
    Edited by: JacobsB on Mar 17, 2008 2:09 PM
    anyway, where does 'player' ever get instantiated. it looks like 'player' would always be null.

  • When my Bluetooth disconnects during a file transfer where is all the data? why do i have to start over?

    while transfering a large video file from my phone to my imac i lost the bluetooth connection so where is all the data that was already transfered and how do i delete it?
    can i pick up where it left off? if not why is it that i have to start over?
    also it would be nice if the imac warned me of the file transfer when i try to put the computer to sleep. i put it to sleep out of habit right in the middle of a 3 hour transfer.

    ''FredMcD [[#answer-722558|said]]''
    <blockquote>
    In the address bar, type '''about:crashes'''<enter>.''' Note:''' If any reports do not
    have '''BP''' in front of the numbers/letters, click it and select '''Submit'''.
    Using your mouse, '''mark''' the most '''resent 7 - 10''' crash reports, and
    '''copy''' them. Now go to the reply box below and '''paste''' them in.</blockquote>
    They all have BP in front of them:
    bp-d4ede524-e8fe-4683-afe1-3310c2150421
    bp-6baa12d9-39d9-4bdf-b936-c900d2150421
    <blockquote>You may have a corrupt '''cookies.sqlite''' file.
    Type '''about:support''' in the address bar and press enter.
    Under the page logo on the left side you will see '''Application Basics.'''
    Under this find '''Profile Folder.''' To it’s right press the button
    '''Show Folder.''' This will open your file browser to the current
    Firefox profile. Now '''Close Firefox.'''
    Locate the '''cookies.sqlite''' file. Then rename or delete it. Restart Firefox.
    </blockquote>
    The files listed are: cookies.sqlite cookies.sqlite.bak cookies.sqlite.bak-rebuild. I tried deleting the cookies.sqlite file but I think the cookies.sqlite.bak-rebuild rebuilds it. In any case when I reopened firefox It was the same I still have to sign in all the time.

  • Apple TV disconnected during streaming and now I can no longer access the AT menu.

    Our Apple TV3 suddenly disconnected during playback of a TV episode purchased from iTunes.  I downloaded this episode onto our Mac OSX 10.8.5. earlier this year. We had watched it before with no problem, but tonight it quit midway through and we received the message that "Apple TV cannot connect with iTunes". I checked and found that Home Sharing was still on, but since I had this problem once before, I turned Home Sharing off in iTunes and the turned it back on, signing in as required.  Despite several attempts, we could not get the program to restart.  Then we got the message that "Apple TV cannot sign in to iTunes".  We tried to reset Apple TV but now we cannot connect to the menu. I pressed the menu button on the remote several times but got nothing.  The remote battery is relatively new and we haven't used the ATV much since then.  All the ATV software is up-to-date and we have the most recent version of iTunes.  Any help getting the menu to appear would be appreciated as well as any help getting the program to play.  Thanks.

    Hi Lourufmom,
    Welcome to the Apple Support Communities!
    I understand that you are unable to access your Home Sharing library on your Apple TV after it disconnected while watching purchased TV episode. The first troubleshooting step that I would recommend, that you may not have yet completed, in this situation would be to restart the Apple TV. Please let me know if the issue continues after restarting your Apple TV.
    How to restart your Apple TV - Apple Support
    If you can't restart your Apple TV because it's unresponsive, try the following:
    Hold down Menu and Down on the Apple Remote for six seconds, and then release when you see the indicator light on the Apple TV blink rapidly.
    Unplug the Apple TV power cord for three seconds, and then plug it back in.
    Have a great day,
    Joe

  • IMovie Project seems to skip and pause very briefly during playback

    I am creating a video montage in iMovie '09, though when viewing the project during playback the video does not play smoothly and seems to skip and pause very briefly while continuing to play. Each clip separately played smoothly prior to its addition into my iMovie project.
    Any suggestions would be greatly appreciated. Thank you.

    What kind of clips are these?
    Specifically, if you right-click on a clip in the Event Browser and select "Reveal in Finder", then right-click on the clip in the Finder and select "Open with...QuickTime Player, and then hit Command-I in QuickTime Player to open the Inspector Window, what codecs are mentioned next to the word "Format:"?

  • I connect my mic with an M-audio mobile pre usb device.  When I try to record, I can see that my voice is recording but can't hear it during playback.

    I connect my mic with an M-audio mobile pre usb device.  When I try to record, I can see that my voice is recording but can't hear it during playback.  I tried different input and output settings but it didn't help.  Any help will be appreciated.

    Hear your microphone or instrument as you play and record (monitoring)
    You can hear, or monitor, input from an instrument or microphone in GarageBand while you play and record. When you turn on monitoring for a track, you hear the musical instrument or microphone connected to the track’s input. Monitoring lets you hear yourself play so that you can hear the part you want to record as well as the rest of the project.
    You can turn on monitoring for a Real Instrument track or Electric Guitartrack from the track’s header, or in the Track Info pane. Electric Guitar tracks always show their monitoring buttons, and you can show monitoring buttons for Real Instrument tracks using a menu command. You can use monitoring with feedback protection to avoid feedback while you play.
    Hide
    To turn on monitoring in the track header:
    Choose Track > “Show Monitoring for Real Instrument Tracks.”Monitor buttons appear in the headers of Real Instrument tracks. On tracks with monitoring turned on, the button lights yellow.
    Click the Monitor button in the header of the track you want to use.
    HideTo turn on monitoring in the Track Info pane:
    Double-click the header of the Real Instrument or Electric Guitar track you want to turn on monitoring for.The Track Info pane opens.
    From the Monitor pop-up menu, choose one of the following:
    Choose Off to turn off monitoring. You can hear your instrument only while you record.
    Choose On to turn on monitoring and protect against feedback.
    Choose On (no feedback protection) to turn on monitoring without feedback protection. If the input level is too high, it may cause feedback (especially if you are using a microphone and listening to your project through your computer speakers).
    For an Electric Guitar track, you can view the Monitor pop-up menu by clicking Edit, and then clicking the back side of the amp. The Monitor pop-up menu appears with the input controls below the stage.
    You should usually turn off monitoring when you are not playing or singing. When monitoring is turned on, your computer can pick up output from your speakers or monitors, causing unwanted feedback. Using headphones rather than speakers to listen to your projects can help eliminate feedback.
    If you select your computer’s built-in microphone as the audio input, in the Audio/MIDI pane of GarageBand preferences, monitoring is turned off for all Electric Guitar tracks to avoid unwanted noise.
    SEE ALSO
    If you don’t hear sound from a Real Instrument 
    Was this page helpful?Send feedback.
    © 2010 Apple Inc. All rights reserved.

  • Satellite A500D-10E - USB sound is cracking/jittery during playback

    Hi!
    I'm having some problems with my USB Audio on my Toshiba A500D-10E.
    The sound is cracking/jittery during all sound playback. Even system sounds when the computer is otherwise idle.
    I have tried two different USB sound devices (Creative Arena USB Headset and Sandberg USB Sound Box 7.1), both with the same crackling sound, both working just fine on two other laptops.
    It's not feedback noise, It is only when sound is playing I get the crackling sound.
    When no sound is playing, the speakers are quiet.
    The Conclusion is that there is some fault with running audio trough my USB ports.
    Mouse, harddrive etc works just fine over the USB ports.
    Running sound trough my onboard soundcard works just fine, except it does not have analog 5.1 output available, thus I need an external sound device to get analog 5.1 sound output. I am now using the Sandberg USB Soundbox 7.1 to achieve this.
    I have tried the following:
    Installing the newest drivers for the USB box
    Tried using the windows-provided generic drivers.
    Reinstalled Windows (twice)
    Tried all the different usb ports
    Tried without any other usb devices plugged in
    Adjusted the output bitrate
    Disabling the onboard soundcard
    Disabled all other sound devices, including recording devices
    I have the newest BIOS update (1.20)
    I have a Toshiba A500D-10E laptop
    2.3GHz Dual core prossessor
    4GB ram
    Radeon HD 4600 series VGA card
    Windows 7 Home Premium 32bit
    All USB ports are USB 2.0 compatible.
    Could you please help me solve this problem? I've done some research and think there might have
    something to do with IRQ sharing, allthough I can not find any good explainations as to how I would go about to fix it.

    >Like I said, I have tried two different USB sound devices (Creative Arena USB headset and Sandberg Soundbox), both work just fine on other laptops I've tested them on, neither works on mine. So I don't think it's the external sound devices.
    Did you test this with different installed Windows systems?
    How about power saving for USB ports?
    Try to disable this.
    Try to connect also the external USB sound card to an external USB hub with an own power supply
    Would be interesting if the same happens too.

  • My Airport disconnects randomly when USB disk is attached..HELP NEEDED !!!!

    My Airport Extreme disconnects randomly when USB disk is attached, I have searched this forum but found now obvious solution.
    The Airport Extreme has the latest firmware.
    Since the airdisk solution is quite useless at this time, I would kindly accept any kind of help .....thanks
    Sieber

    Len61 got my reply, I have copied below.
    Hi - I have been on the phone with support 4X since late December - all good calls. They have been scratching their heads on this issue.
    I have 2 printers and 2 drives on the airport -recent experieinces = printers have always behaved, drives have appeared / vanished / "drive needs repair" and it's just fine...
    Cutting out the interim fixes, here are the simple but important solutions and everything has been stable for days now.
    * rolled back to AEBS firmware 7.1.1
    * replaced the passive USB hub with a powered hub ** This is when joy arrived
    * make sure your drive has a block size of 512
    You can run guest mode however you want, since adding the new hub, it hasn't mattered.
    I haven't been brave enough to upgrade firmware to 7.2.1
    cheers

  • HT201413 I keep error 9 when i try to restore my Ipod 5.It seems to be that my device disconnects during the restore process, then error messege pops up. I have updated the security settings on my pc and it still doesn't work.

    Error 9 pops up when trying to restore Ipod 5. The problem seems to be that my ipod disconnects during the restore process. My ipod is stuck in restore mode so I can't access its update serever. I have already updated my pc and its security settings. Is there anything else i can try?

    Hello AS234,
    This error is typically indicative of a conflict with installed security software.
    Configure your security software
    Check your security software and settings, which can block ports and prevent connection to Apple servers during update and restore.
    Common errors: 2, 4, 6, 9, 1000, 1611, 9006, 9807, 9844. Sometimes as a result of this issue, a device might stop responding during the restore process.
    Resolve specific iTunes update and restore errors
    http://support.apple.com/kb/TS3694
    Cheers,
    Allen

  • IDVD slideshow DVD pauses video and audio during playback...messages about sleeping DVD player

    I have just burned a slideshow on iDVD from iPhoto book project. During playback, the DVD player pauses with photo visible and audio stops for same time, and then resumes after about 5 seconds. I thought the MP3 (purchased from Amazon because it was not in iTunes) format may have been the issue, so, I converted to AAC, and rebuilt slideshow from scratch using AAC music. During Preview playback, the problem does NOT exhibit...only when played from produced DVD on both computer or DVD player. I only have this one pause at same time on every DVD burned. Is AIFF a probable solution? I saw a message saying DVD player "Sleeping" or "DVD player waked from sleeping" at beginning and end of this pause.

    Whoa!!! I'd back up here and make sure you have your "T" s crossed before your continue with 10,000 discs! What were your bitrates for the main track and Bonus features? Did you use AC3 audio? DVD has a bitrate ceilings of 9.8 for video. Its also important you check your bitrates in a viewer to makes sure your OK.
    Bitrates are the most crucial part to control in DVD.
    http://www.videohelp.com/tools?toolsearch=bitrate+view&Submit=Search&s=&orderby= Name&hits=50&convert=&dvdauthorfeatures=

  • Premiere Pro CC 2014 - Black flickering lines during playback and when exporting video

    I am fairly new to Premiere and have recently started using creative cloud on my new MacBook Pro retina - 2.3 GHz Intel Core i7 - 16GB Memory - OSX Version 10.9.4
    I shot a music video using my friends camera and all the shots were absolutely fine, I dropped them into Premiere and started editing the video together.
    Some of the clips are perfectly fine during playback, although sometimes my playback stutters a little, but some of the clips have strange horizontal lines that flash through them when I watch it back. I have only used basic things such as the highlight/shadow and sharpen tools in Premiere. I thought that it maybe fine once I exported the video but when I open up the exported file on my desktop in Quicktime the little black flashes/glitches are still there in some of the shots.
    Here is a screenshot you can see a line halfway between the top of my head and the top of the screen, when you watch the video there are lots of these flashing about.
    Could this be something that I have set up wrong?
    CPU/GPU related?
    Thanks,
    Jordan

    Hi there,
    thanks for the reply!
    GRAPHICS = NVIDIA GeForce GT 750M 2048 MB
    I tried that but it didn't work unfortunately, Mine was already set to the one you said, I tried the other but no change

  • Audio levels on an external monitor vary during playback when using HDMI audio

    I've been having issues with movie playback using a large 1080p HDMI TV.   During playback the audio level will come in strong, go faint, then go strong again, but not on any sort of pattern I could discern.   It did this on three seperate movies legally purchased via iTunes.  I get audio and video without trouble, its just the audio goes soft when it shouldn't.
    If you remember the VHS days and "MACROVISION" encoding, then you have an idea what it was doing, although it was the audio levels, not the video playback.
    Is this a fault of the system, a DRM gremlin, or something else?

    I think you may be onto something with the graphics card concept. The problem I am having only exists when I am working on an HD project. When I switched back to DV-NTSC then the monitor is fine during playback.
    Yes, I am routing my external monitor through my DV deck, which is not an HD deck - so again, that could be another weak link in the chain.
    This is the first HD project that I am editing, so obviously a few kinks still need to be worked out. My internal hard drive has 1.5 gigs of ram but I am not sure what the specs are on the graphics card.

  • Playhead randomly JUMPS to the end of the timeline when "editing" during playback

    CS 6.0.1
    OSX 10.7.4
    I love the new feature in CS6 that lets you edit DURING playback, and playback won't stop. Brilliant.
    Now, I use this feature a lot making cuts as I go. I use the "command + shift + k" combo to make an edit to all tracks while the playhead is moving along. It seems though that every so often when I do this, the playhead warps to the end of the timeline. Very frustrating, and when dealing with long timelines,really slows me down, to get back to where I was working.
    Also I can repeat this "glitch" very easily, so its not some totally random occurance. Just pushing cmd+shift+k while the playhead is moving a few times repeats it very quickly.
    Am I doing something wrong here? Or toggling some OTHER key command inadvertently? Or is this a legit glitch?
    EDIT: I would like to add that using the "nudge" command during playback has the same glitch of arbitrarily jumping to the end of the timeline if you click the nudge command quickly in succession.

    This issue was NOT resolved by manually installing all cs6 updates that were failing with adobe product manager, then doing a clean installation of the latest drivers from Nvidia's website using the ODE (Optimal Drivers for Enterprise) Graphics Drivers.
    The issue came back after editing for a little bit., however this following fix worked:
    *FIXED BY ADOBE TECH SUPPORT INDIA*
    The solution was to delete all media cache files and all cache settings for the specific project.   Check all your cache locations and encoded media file locations.
    Rebuild project on load.... edit.    Thanks.

Maybe you are looking for