BCB Components rotating around DirectX

Welcome to BCB-Tools.com Latest News

Development Tools Demo Applications Step-By-Step Tutorials Component Reference

Register Here Available Downloads

Frequently Asked Questions Discussion Forums Receive emails from BCB-Tools.com Send us some Feedback

Links to other sites Information about the BCB-Tools.com website


    FORUM MESSAGE
    Go to the Welcome Page
        FORUM MESSAGE

    You are reading a General forum message.

    Re: To anyone that read this-. individual sound (simple procedure)

    Author: Israel Luengo

    Date Posted: 2004-12-17 08:14:16



    Ah...only a dude-post here

    if you want play an individual sound....for minor complication
    i think with this call to Windows API resolve the problem

    // Add the include necessary: #include <mmsystem.h>

    PlaySound("c:\\myMusic.wav",
    NULL,
    SND_FILENAME | SND_ASYNC);

    //warning, if we use SND_ASYNC the function returns inmediately after the sound begins
    //for example...is inmediate after the sound we have the exit of the program, the sound is stopped by the system
    //solution: we must use  SND_SYNC and de function waits until  the end of the sound.

    //(looped mode infinitely ....we can put  SND_LOOP)

    the PlaySound function.-..returns TRUE if all it's O.k.   or FALSE on error.

    and....yes!! for stop the sound ;))

    PlaySound(NULL, NULL, SND_FILENAME);

    that's all....(only if you want play ONE sound without a headache)
    heheheh

    Regards
    Israel Luengo




    REPLY TO THIS MESSAGE?
    Top    

    You can post a reply to this General message using the form below:
    Your Name:


    Message Subject:


    Message Body:


    Verification:





    When ready, click on the submit button below:






Top

Welcome |  Latest News |  Tools |  Demos |  Tutorials |  Reference |  Register |  Downloads
FAQ |  Forums |  Feedback |  Mailing List |  Links |  Site Information

This page is Copyright © 2007 Darren John Dwyer, Australia. All Rights Reserved.
Borland C++ Builder, CBuilder, etc are Trademarks of Borland Corporation.
DirectX, DirectDraw, Windows, etc are Trademarks of Microsoft Corporation.