OpenAl, sound judgment

Hey all, I used the cowbell as the base sample to get the sound to work on my application, and while that's fine, I was wondering how to stop on command. My attempt for this used the same frame as the original sound, but replace the command alSourcePlay (source) with alSourceStop (source), the naïve impression, it could be as simple as that. Is there a good documentation to achieve this or if someone knows the solution that would be great.

I would have included my code but there are several excerpts in different files, and it is essentially the same as the way in which the alSourcePlay (source) was launched with just this change. As always, look forward to a response.

Hello

I think that it IS as simple as calling alSourceStop (source) with a valid source identifier

The best place to start is Spec OpenAL , which has all the information you need.

Thanks for posting!

RAM

Tags: BlackBerry Developers

Similar Questions

  • Addition of two functions in a single button (gotoAndStop, sound judgment)


    Hi all! First of all, I would like to say that I am a beginner total with respect to as3. Okay, let's look at my problem... I have 2 scenes (first of all is a main menu with the button New Game; second scene is the intro for the game). I'm having difficulties to do two functions within a single button. Why do I need that? The first function is to go to the next scene (in my case, IntroScene). Second is to disable the sounds, so I can not hear them in the next scene.

    Here is the code:

    var bobobg:bobomusic;
    var sndChannel:SoundChannel;

    bobobg = new bobomusic;
    sndChannel = bobobg.play ();

    MAIN - NEW GAME MENU BUTTONS
    newgame_btn.addEventListener (MouseEvent.CLICK, buttonClick3);
    newgame_btn.addEventListener (MouseEvent.CLICK, buttonClick4);
    function buttonClick3(event:MouseEvent):void {}
    gotoAndPlay (1, "IntroScene");
    }
    function buttonClick4(event:MouseEvent):void {}
    bobobg. Stop();
    }


    Error message: "TypeError: Error #1006: stop is not a function."
    to MainMenu_fla::MainTimeline/buttonClick4().

    I would appreciate if someone could help me with this. Thank you!

    Ok.  Just do this:

    var bobobg:bobobgmusic = new bobobgmusic();
    var sndChannel:SoundChannel = new SoundChannel();

    sndChannel = bobobg.play ();

    MAIN - NEW GAME MENU BUTTONS
    newgame_btn.addEventListener (MouseEvent.CLICK, buttonClick3);

    function buttonClick3(event:MouseEvent):void
    {
    gotoAndPlay (1, "IntroScene");
    sndChannel.stop ();
    }

  • Market / sound judgment

    Hello

    I have a presentation with voice and distinct background music. I'll put a sound in a loop on a different level, and usually have a toggle button between the loading and unloading of this film to disable and re-enable background music. But this time I just need to turn on and turn off all THE sounds (big volume of turning point for all the sounds of 100 to 0, and vice versa when they switch back). The voice-over is a dozen of audio files on the timeline of _level2 that will be the background music. I don't want to create sound objects for each of these sounds or create movieClips as holders, etc.

    Is it possible that I can just tell him to stop all sounds and start all sounds without having to go through the creation of sound objects, etc. ? Is there a global StartAllSounds? Looks like it should be easier. I can write something that will start all the sounds in _level2?

    Thank you
    Brian

    I found this on Flashkit.com. I used this global script and it worked very well. My audio on _level2, I substituted _level2 _root and instead to put the first line in the main timeline, I put it in the script of the film _level2.

    the main scenario
    globalvolume = new Sound(); No cutting of associated movie.

    button to mute sound and change the rocker mc frames
    {We (Release)}
    If (_root.globalvolume.getVolume () > 0) {}
    _root.globalvolume.setVolume (0); mutes all sounds
    Play(); switch to cut the frame
    } else {}
    _root.globalvolume.setVolume (100); Restores the sound all sounds
    Play(); switch to activate the sound setting
    }
    }

  • Cannot open the default audio device: a device ID has been used that is out of range of your system. Sound will be disconnected.

    I get the error in the title with a host Windows 7 x 64 Workstation 7.1.3 and an Ubuntu guest.

    I did a sound material change on the host today (audio embedded used instead of the USB sound card), but sound works perfectly well on the host computer.

    I had the same problem as well. I have a host 64-bit windows 7 and the quest of Ubuntu running on VMware Workstation 6.5.

    After playing with the settings a bit, that's how I managed to do the work. In Ubuntu, open sound preferences:

    In the Hardware tab, my profile was set to 'analog stereo Duplex. I changed it to "Analog stereo output" and everything has been resolved. I was able to connect the sound card!

  • Prevents an ambient sound?

    A while ago, I created a 'site' with several pages that the Viewer could navigate. I have an audio clip that is supposed to execute a loop while on the home page, but stop once you click navigation buttons to join the other pages... and then, of course, play again to go "home".

    Originally, it was created in Flash 4 and I placed the sound directly in the mc of the homepage. I think I put a 'stop' on this topic, and it made the sound judgment to navigate to another page.

    Since then, I open the FLA file in Flash 5 and made a few changes to the file - including out the audio file from the library and having Flash take it from a XML file. However, the sound stops is when I navigate to a new page. He only stops looping and over-laping...

    I tried to solve this problem with a script of "ambient sound channels" I learned, but I'm obviously something wrong.

    Can anyone help? Thank you!

    var sc:SoundChannel;

    SC = yoursound. Play();

    use:

    SC. Stop();

    to stop the yoursound.

  • IDT High Definition Audio CODEC (NO SOUND PROBLEM)

    My PC Info is:

    Manufacturing: Hewlett-Packard

    Model: HP EliteBook 8460p

    Rating: 5.3 Windows Experience Index

    Processor: Intel (r) CPU of Core i5 - 2520M 2.50 GHz 2.50 GHz

    Installation of memory (RAM): 4.00 GB (2.98 GB usable)

    System type: 32-bit operating system

    Pen and touch: no pen or press enter is available for this view

    Windows 7 Professional

    Product ID: 00371-OEM-8992671-00008

    Problem: I was watching a movie one night before I cut and I forgot to turn on my laptop, today I discovered that the sound does not work, then I tried to restart and still without hope, I tried to disable and don't allow the IDT High Definition Audio CODEC and still no hope, windows says that this device is working properly , but oviously it's not I really need help, I don't know what it is advanced technology, so im helpless.

    Hello

    Try the following.

    Download IDT Audio Installer on the link below and save it in your downloads folder.

    FTP://ftp.HP.com/pub/SoftPaq/sp59001-59500/sp59291.exe

    One time finished, open windows control panel, open Device Manager and open sound, video and game controllers.  Right click on the IDT device and select uninstall - also, you should get a command prompt to delete the current driver, check the box allow this and then proceed to uninstall.

    When you're done, shut down the laptop, unplug the AC adapter and then remove the battery.  Press and hold the Power button for 30 seconds.  Reinsert the battery and plug in the AC adapter.

    Only start the laptop and let Windows load completely - it will automatically load an audio driver, but let just this complete.  Then open your download folder, right-click on the IDT Installer and select "Run as Administrator" to launch the installation.  Once this done, do a right-click the speaker icon in the taskbar and select playback devices.  'Speakers and headphones' left click once to highlight, and then click the Set Default button - check if you now audio.

    Kind regards

    DP - K

  • IDT Audio (bat) lack tab improvements to Windows Sound (sound check)

    Hi all

    I own a HP Pavilion DV6-6C57NR with Beats Audio for more than a year. A Couple of weeks, my computer crashed in a big way so I reinstalled Windows 7. I realized all my drivers and my sound works fine (except that [Fn] + B is not enable and disable the beats). The only problem is that I have more access to the improvements to Windows Sound tab

    I use the Volume equalizer in the strong rooms all the time. Any help to get it back would be appreciated.

    Sincerely,

    H

    Hello

    Whether or not you have the "Improvements" tab is down to the driver audio especially is installed - some allow this functionality and some do not.

    Try the following.

    Download IDT Audio Installer on the link below and save it in your downloads folder.

    http://ftp.HP.com/pub/SoftPaq/sp55001-55500/sp55094.exe

    One time finished, open windows control panel, open Device Manager and open sound, video and game controllers.  Right click on the IDT device and select uninstall - also, you should get a command prompt to delete the current driver, check the box allow this and then proceed to uninstall.

    When finished, restart the laptop.

    Allow Windows to fully - charge it will automatically load an audio driver, but let just this complete.  Then open your download folder, right-click on the IDT Installer and select "Run as Administrator" to launch the installation.  Once done, check if you have the tab improvements back.

    Note:  If you want the fn + combination B works correctly, you need to download and install the HP Quick Launch bar from the link below.

    HP Quick Launch buttons.

    Once the installation is complete, restart the computer before checking it in.

    Kind regards

    DP - K

  • Re: Satellite Pro C50 - A is not reproduce sound via HDMI

    Hello

    I almost tried everything, but it does not recognize the HDMI as his player. The picture is good, but sounds continue to play through the speakers of the computer laptop itself.

    I checked the playback on the audio config and it does not appear to select HDMI device.

    I also checked in the Manager device and uninstalled the "IDT High Definition Audio CODEC" that has been updated automatically once the reset of the laptop, but I did not appreciate any changes at all.

    Is there any concrete driver to install?

    Please, any advice will be appreciated.

    Concerning

    Juan

    Stand by.
    When you see the content on TV please open sound properties in Control Panel > playback and check the entries there.

    Click with the right button of the mouse, you and the two options (see the disabled, devices disconnected).
    Usually, an HDMI output should be listed as disabled device and you can activate it manually.

    Disable and enable HDMI device and all speakers should be OK.

  • HP 15 laptop: DTS Audio Control Panel is not open

    Control Panel audio dts is not open I try several times. OS-Windows 7 64 bit {OEM} model name HP r006tu.

    Hello

    Try the following.

    Download the Realtek Audio Installer on the link below and save it in your downloads folder.

    http://ftp.HP.com/pub/SoftPaq/sp69501-70000/sp69611.exe

    One time finished, open windows control panel, open Device Manager and open sound, video and game controllers.  Right click on the Realtek device and select uninstall - also, you should get a command prompt to delete the current driver, check the box allow this and then proceed to uninstall.

    When you are finished, download and reinstall the Chipset driver at the following link.

    http://ftp.HP.com/pub/SoftPaq/sp69501-70000/sp69575.exe

    When the reinstallation of Chipset is finished, stop the laptop.

    Disconnect the power adapter and remove the battery.  Press and hold the Power button for 30 seconds.  Reinsert the battery and plug in the AC adapter.

    Start, then laptop and when Windows is loaded, open your download folder, right-click on the installation of Realtek Audio program and select "Run as Administrator" to launch the installation.  When this has completed, restart the laptop.

    Let windows take over completely for a few minutes before checking if the DTS control panel will now open Ok.

    Kind regards

    DP - K

  • HP Envy 15 - 3040nr Sound stopped working

    Hello

    The sound on my hp envy 15-3040nr has just stopped working. I reinstalled the sound drivers, checked to see if the speakers have been disabled in Device Manager and used the tool to troubleshoot the system and security. None of them helped. Its also not working with headphones.

    Any help will be greatly appreciated.

    Hello

    Try the following.

    Download IDT Audio Installer on the link below and save it in your downloads folder.

    http://ftp.HP.com/pub/SoftPaq/sp56501-57000/sp56900.exe

    One time finished, open windows control panel, open Device Manager and open sound, video and game controllers.  Right click on the IDT device and select uninstall - also, you should get a command prompt to delete the current driver, check the box allow this and then proceed to uninstall.

    When you're done, shut down the laptop, unplug the AC adapter and then proceed to a "forced Reset" by holding down the power and time for 10 seconds.  When done, plug in the adapter.

    Robinet tap away at the key esc that you start the computer to launch the Start Menu, and then select f10 to open the bios menu.  Press f5 to load the default values (sometimes it's f9, but the menu below indicates the correct key), use the arrow keys to select 'Yes' and press ENTER.  Press f10 to save the setting and still use the arrow keys to select 'Yes' and press on enter.

    Allow Windows to fully - charge it will automatically load an audio driver, but let just this complete.  Then open your download folder, right-click on the IDT Installer and select "Run as Administrator" to launch the installation.  Once this done, do a right-click the speaker icon in the taskbar and select playback devices.  'Speakers and headphones' left click once to highlight, and then click the Set Default button - check if you now audio.

    Kind regards

    DP - K

  • Sound does not work on my Satellite A200

    Hi guys,.

    Wondering that if you can offer me any advice, the sound does not work on my laptop. I tried to update the driver, but not luck. I did all the simple things like volume control, basic etc etc settings and I tried to do a system restore, but only restore point is yesterday, (which I think can be another problem, but anyway) it is after the problem began, is not good.

    Thanks for your help,

    GR

    Hello

    Can you please tell us what A200 you exactly (A200-xxx)?
    What operating system do you use?
    Are you using the original recovery Toshiba (Toshiba pre-installed Windows) image?

    Have you checked the Device Manager? Sound card not shown here?
    Open sound please properties > playback devices and do not forget that speakers of the option is enabled.

    Can you hear anything when you use headphones or headset?

  • NO sound from speakers or headphones

    HP ENVY 15-3033cl laptop PC

    Windows 7 64 bit

    no error message, I was watching a movie when my laptop died. I plugged it into the power source and now there is no sound from speakers or headphones when I plug. I already went through the troubleshooting steps sound but it says there is no problem detected by the device. The computer is still failry new less than a year, but lies outside of the 90 day warranty. Help please.

    Hello

    Try the following.

    Download IDT Audio Installer on the link below and save it in your downloads folder.

    http://ftp.HP.com/pub/SoftPaq/sp56501-57000/sp56900.exe

    One time finished, open windows control panel, open Device Manager and open sound, video and game controllers.  Right click on the IDT device and select uninstall - also, you should get a command prompt to delete the current driver, check the box allow this and then proceed to uninstall.

    When you're done, shut down the laptop and perform a "Hard Reset" for your model, as described in the document of HP here.

    One when you're done, press next to the key ESC that you start the computer to launch the Start Menu, then select f10 to open the bios menu.  Press f5 to load the default values (sometimes it's f9, but the menu below indicates the correct key), use the arrow keys to select 'Yes' and press ENTER.  Press f10 to save the setting and still use the arrow keys to select 'Yes' and press on enter.

    Allow Windows to fully - charge it will automatically load an audio driver, but let just this complete.  Then open your download folder, right-click on the IDT Installer and select "Run as Administrator" to launch the installation.  Once this done, do a right-click the speaker icon in the taskbar and select playback devices.  'Speakers and headphones' left click once to highlight, and then click the Set Default button - check if you now audio.

    Kind regards

    DP - K

  • Laptop HP G62 - just stop job sound

    I don't know what happened, but there are about 30 minutes, the sound came out. I restarted my laptop and no sound.  I plugged my earpiece and still no sound.

    HP G62 laptop

    Windows Home Premium - 64-bit

    Hi Helen,

    Try the following.

    Download Realtek HD Audio Installer on the link below and save it in your downloads folder.

    http://ftp.HP.com/pub/SoftPaq/sp48001-48500/sp48281.exe

    One time finished, open windows control panel, open Device Manager and open sound, video and game controllers.  Right click on the Realtek audio device and select uninstall - also, you should get a command prompt to delete the current driver, check the box allow this and then proceed to uninstall.

    When you are finished, download and reinstall the Chipset driver at the following link.

    Chipset Driver - Windows 7.

    Once this done, stop the laptop, unplug the AC adapter and then remove the battery.  Press and hold the Power button for 30 seconds.  Reinsert the battery and plug in the AC adapter.

    Robinet tap away at the key esc that you start the computer to launch the Start Menu, and then select f10 to open the bios menu.  Press f5 to load the default values (sometimes it's f9, but the menu below indicates the correct key), use the arrow keys to select 'Yes' and press ENTER.  Press f10 to save the setting and still use the arrow keys to select 'Yes' and press on enter.

    Allow Windows to fully - charge it will automatically load an audio driver, but let just this complete.  Then open your download folder, right-click on the installation of Realtek Audio program and select "Run as Administrator" to launch the installation.  Once this done, do a right-click the speaker icon in the taskbar and select playback devices.  'Speakers and headphones' left click once to highlight, and then click the Set Default button - check if you now audio.

    Kind regards

    DP - K

  • No sound on my HP 2000 after update...

    Product ID: 00179-60940-54099 AAOEM

    64 bit

    I have no sound...

    Hello

    Try the following.

    Download Realtek HD Audio Installer on the link below and save it in your downloads folder.

    Realtek HD Audio Driver - Windows 8.1

    One time finished, open windows control panel, open Device Manager and open sound, video and game controllers.  Right click on the Realtek device and select uninstall - also, you should get a command prompt to delete the current driver, check the box allow this and then proceed to uninstall.

    Then, download and reinstall the Chipset driver on the following link.

    Chipset Driver - Windows 8.1

    When done, shut down the laptop by holding down the key SHIFT left click Shutdown to temporarily prevent a hybrid boot.

    Disconnect the power adapter and remove the battery.  Press and hold the power button for 20 seconds.  Reinsert the battery and plug in the AC adapter.

    Robinet tap away at the key esc that you start the computer to launch the Start Menu, and then select f10 to open the bios menu.  Press f5 to load the default values (sometimes it's f9, but the menu below indicates the correct key), use the arrow keys to select 'Yes' and press ENTER.  Press f10 to save the setting and still use the arrow keys to select 'Yes' and press on enter.

    Allow Windows to fully - charge it will automatically load an audio driver, but let just this complete.  Then open your download folder, right click on the installer of Realtek and select "Run as Administrator" to launch the installation.  Once this done, do a right-click the speaker icon in the taskbar and select playback devices.  Left click "Speakers/HP" (speakers or headphones) once to highlight, and then click the Set Default button - check if you now audio.

    Kind regards

    DP - K

  • Sound does not work windows of the Envy 15 TS 8 and 8.1 of windows laptop

    Hello

    My audio Envy 15 TS (number of product C8P48AV) laptop has stopped working.

    Since I got it, it happened 3 times.

    Firstly was after 1 week of use. After a few days TI cams vice versa...

    Then I upgraded to windows 8.1 and it stopped again...

    Last night, a few days after the 2nd time, it started working again.

    But today it stopped again.

    I don't know how to solve.

    On audion settins it is said that the sound works well.

    If I'm on a call the microfone Skype works, but I can't hear anything.

    I have not found it as the codec just to try to reinstall it.

    Can anyone helpe me?

    Kind regards

    Luiz

    Hello Luiz,

    Try the following.

    Download IDT Audio Installer on the link below and save it in your downloads folder.

    http://ftp.HP.com/pub/SoftPaq/sp63501-64000/sp63555.exe

    One time finished, open windows control panel, open Device Manager and open sound, video and game controllers.  Right click on the IDT device and select uninstall - also, you should get a command prompt to delete the current driver, check the box allow this and then proceed to uninstall.

    When you are finished, download and reinstall the Chipset driver at the following link.

    Chipset Driver - Windows 8.1

    Once the reinstallation is complete, turn off the laptop by pressing the SHIFT key when you click farm to temporarily prevent a hybrid boot.  One time finished, disconnect the power adapter, and then remove the battery.  Press and hold the Power button for 30 seconds.  Reinsert the battery and plug in the AC adapter.

    Robinet tap away at the key esc that you start the computer to launch the Start Menu, and then select f10 to open the bios menu.  Press f5 to load the default values (sometimes it's f9, but the menu below indicates the correct key), use the arrow keys to select 'Yes' and press ENTER.  Press f10 to save the setting and still use the arrow keys to select 'Yes' and press on enter.

    Allow Windows to fully - charge it will automatically load an audio driver, but let just this complete.  Then open your download folder, right-click on the IDT Installer and select "Run as Administrator" to launch the installation.  Once this done, do a right-click the speaker icon in the taskbar and select playback devices.  'Speakers and headphones' left click once to highlight, and then click the Set Default button - check if you now audio.

    Kind regards

    DP - K

Maybe you are looking for