File: playMusic.cpp

package info (click to toggle)
between 6%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, stretch
  • size: 3,532 kB
  • sloc: cpp: 28,110; php: 718; ansic: 638; objc: 245; sh: 236; makefile: 99; perl: 67
file content (42 lines) | stat: -rw-r--r-- 801 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
int mainFunction( int inArgCount, char **inArgs );

int main( int inArgCount, char **inArgs ) {
    return mainFunction( inArgCount, inArgs );
    }


#include <SDL/SDL.h>


#include "musicPlayer.h"

#include "minorGems/system/Thread.h"

double musicTrackFadeLevel = 9 / 9.0;


int mainFunction( int inArgCount, char **inArgs ) {
    
    setMusicLoudness( 1 );
    
    if( inArgCount > 1 ) {
        startMusic( inArgs[1] );
        }
    else {
        startMusic( "music.tga" );
        }
    
    while( true ) {
        int number;
        int numRead = scanf( "%d", &number );
        
        if( numRead == 1
            && number >0 && number <=9 ) {
            
            musicTrackFadeLevel = number / 9.0;
            }
        
        //Thread::staticSleep( 1000 );
        }
    }