Skip to content

A C library that uses miniaudio and provides a easy User Interface like in Python for pygame.

License

Notifications You must be signed in to change notification settings

Sherry65-code/easyaudio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EASYAUDIO

A C library that uses miniaudio and provides a easy User Interface like in Python for pygame.

  • How to build ?

    • Simply type this in the terminal

      sudo make install
  • Example Program

    #include <stdio.h>
    #include <easyaudio/easyaudio.h>
    
    char ch;
    int isPlaying = 1;
    
    int main(int argc, char **argv) {
      play("never gonna give you up.mp3");
      while (1) {
        ch = getchar();
        if (ch == 'k') {
          if (isPlaying) {
            printf("Paused\n");
            pause();
            isPlaying = 0;
          }
          else {
             printf("Playing\n");
             resume();
             isPlaying = 1;
          }
        }
        else {
          stop();
        }
      }
      return 0;
    }
  • To compile

    cc -o program program.c -lm

Thank you for supporting us. Please give us a 🌟

This project has been made possible by miniaudio.

About

A C library that uses miniaudio and provides a easy User Interface like in Python for pygame.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages