Thread: sound player and loading gesture

  1. #1
    Registered User ali_ahmadian's Avatar
    Join Date
    Oct 2011
    Location
    malaysia
    Posts
    5

    sound player and loading gesture

    Hi everyone im writing a program in C language and I needed 2 functions to be added to me code
    1) the sound player
    2) the loading gesture which appears on screen

    i've been searching for these two codes for long time and steel I couldn't get any appropriate results

    please help me to wrap this assignment faster

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Neither of which makes a great deal of sense without you also specifying which OS/Compiler you're using.
    Or for that matter, which kind of program (console, gui) you're writing, or even what libraries you're already using.

    I mean, if you just happen to be writing an ncurses console program for Linux, there is no point at all in us making a wild stab in the dark and guessing that you're writing a directX program for windows.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User ali_ahmadian's Avatar
    Join Date
    Oct 2011
    Location
    malaysia
    Posts
    5
    im using windows and not Linux and the current libraries which i use are :
    #include<stdio.h>#include<stdlib.h>
    #include<conio.h>
    but there is no restriction on the number and the type of libraries.
    and im making a simple washing machine so the rest are easy ...

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Now does conio.h mean you're using TurboC?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User ali_ahmadian's Avatar
    Join Date
    Oct 2011
    Location
    malaysia
    Posts
    5
    No .
    i used it to create text-based user interface .

  6. #6
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by ali_ahmadian View Post
    No .
    i used it to create text-based user interface .
    Ok... so what compiler are you using?

    (and yes it matters)

    Also... you can't put two #includes on the same line. The preprocessor isn't that smart.

  7. #7
    Registered User ali_ahmadian's Avatar
    Join Date
    Oct 2011
    Location
    malaysia
    Posts
    5
    visual studio 2010
    i know that i cant put two #include in one line my Enter bottom has problem

  8. #8
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Well, gawrsh... just when my crystal ball is in for repairs too...

    How about posting your code so we can see what you're talking about...

  9. #9
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Well for the sound stuff, there is this other "sound" thread on the go at the moment.
    Sounds in DevC Help
    It's the same function.

    > 2) the loading gesture which appears on screen
    What does this mean?
    Splash screen - Wikipedia, the free encyclopedia
    Progress bar - Wikipedia, the free encyclopedia
    or something else (try posting a link or a picture)
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  10. #10
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Salem View Post
    Well for the sound stuff, there is this other "sound" thread on the go at the moment.
    Sounds in DevC Help
    It's the same function.

    > 2) the loading gesture which appears on screen
    What does this mean?
    Splash screen - Wikipedia, the free encyclopedia
    Progress bar - Wikipedia, the free encyclopedia
    or something else (try posting a link or a picture)
    He probably wants this...
    Code:
    #include <windows.h>
    
    HCURSOR OldCursor = NULL;
    HCURSOR BusyCursor = LoadCursor(NULL,IDC_APPSTARTING);
    
    
    // start of busy spot
    if (BusyCursor)
      OldCursor = SetCursor(BusyCursor);
    
    // do something longer than 2 seconds
    
    // end of busy spot
    if (OldCursor)
      SetCursor(OldCursor);
    SetCursor()
    LoadCursor()
    Last edited by CommonTater; 10-16-2011 at 04:06 AM.

  11. #11
    Registered User ali_ahmadian's Avatar
    Join Date
    Oct 2011
    Location
    malaysia
    Posts
    5
    sorry to inform you guys but I really dont know how to use these codes !
    I mean for sound playing the link was quite OK but I dont know how should I introduce the song to the compiler.
    and for the loading thing I think the progress bar is good but again I didnt undrestand how to use it

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Gesture Based Drawing App
    By John_L in forum C# Programming
    Replies: 0
    Last Post: 03-10-2008, 06:01 PM
  2. Is it a watch? Is it an MP3 player? Is it a video player?
    By twomers in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 08-15-2006, 10:54 PM
  3. wave player or mp3 player using C
    By lliero in forum C Programming
    Replies: 5
    Last Post: 02-27-2002, 11:33 AM
  4. exemption gesture.
    By doubleanti in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 02-22-2002, 05:53 PM
  5. MCI CD Player
    By soutine in forum Windows Programming
    Replies: 0
    Last Post: 11-02-2001, 05:03 PM