This commit is contained in:
Vilyaem 2025-02-19 06:20:18 -05:00
commit 08ecef0063
4 changed files with 92736 additions and 0 deletions

41
README.TXT Normal file
View file

@ -0,0 +1,41 @@
____ __ __ _ _ _
U /"___| \ \ / /U /"\ u | \ |"|
\| | u \ V / \/ _ \/ <| \| |>
| |/__ U_|"|_u / ___ \ U| |\ |u
\____| |_| /_/ \_\ |_| \_|
_// \\.-,//|(_ \\ >> || \\,-.
(__)(__)\_) (__)(__) (__)(_") (_/
cyan
Cyan is a minimal and suckless music and audio player that runs in your
terminal, it is written in C89.
DEPENDENCIES
* stdio
* miniaudio -- public domain audio library
COMPILATION
compile it.
PHILANTHROPY
Donate Monero: 48Sxa8J6518gqp4WeGtQ4rLe6SctPrEnnCqm6v6ydjLwRPi9Uh9gvVuUsU2AEDw75meTHCNY8KfU6Txysom4Bn5qPKMJ75w
Donate Wownero: WW2L2yC6DMg7GArAH3nqXPA6UBoRogf64GodceqA32SeZQpx27xd6rqN82e36KE48a8SAMSoXDB5WawAgVEFKfkw1Q5KSGfX9
Donate Liberapay: https://liberapay.com/vilyaem/donate
If you have philanthropic ideas, contact Vilyaem.
CONTACT
kenyaz {at} vilyaem.xyz
LICENSE
Public Domain CC0

5
c.sh Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
rm cyan
cl
cc -O3 -std=c89 -Wall -Wextra -Wpedantic main.c -o cyan
x86_64-w64-mingw32-cc -O3 -std=c89 -Wall -Wextra -Wpedantic main.c -o cyan.exe

69
main.c Normal file
View file

@ -0,0 +1,69 @@
/*********************************************
* Description - Cyan audio player
* Author - Vilyaem
* *******************************************/
/*----------PREPROCESSOR----------*/
#define _XOPEN_SOURCE 500
#include <stdio.h>
#define MINIAUDIO_IMPLEMENTATION
#include "miniaudio.h"
#define FILES 32
/*----------DATASTRUCTURES----------*/
/*----------GLOBALS----------*/
/*----------FUNCTIONS----------*/
/*********************************************
* Description - main
* Author - Vilyaem
* *******************************************/
int main(int argc, char** argv){
int i;
ma_engine e;
ma_sound sound;
ma_result res;
char c;
puts("cyan by Vilyaem\n\nPlaying...");
ma_engine_init(NULL,&e);
for(i = 1; i != argc; ++i)
puts(argv[i]);
if(argc < 1){
puts("Not enough arguments");
return 1;
}
for(i = 1; i != argc; ++i){
ma_sound_uninit(&sound);
printf("> %s\n",argv[i]);
res = ma_sound_init_from_file(&e,argv[i],0,NULL,NULL,&sound);
if(res != MA_SUCCESS){
printf("Failed to play file: %s\n",argv[i]);
return 1;
}
ma_sound_start(&sound);
while(1){
usleep(1);
c = getchar();
if(c == '\n'){
break;
}
}
}
ma_engine_uninit(&e);
return 0;
}

92621
miniaudio.h Normal file

File diff suppressed because it is too large Load diff