-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Running the following C code on Arch Linux
#include "../include/simpleaudio.h"`
#include <stdio.h>
int main() {
init_ao();
printf("Simple Audio Player library is successfully included!\n");
int ret = play_sync("audio/music.mp3", 100);
if (ret == -1) {
printf("Failed to play audio!");
}
destroy_ao();
return 0;I get this output
op_open_live() failure: Input/output error
Unless I run it as root.
Then I get the following and it plays the audio.
Simple Audio Player library is successfully included!
this is my Makefile
BUILD_DIR := build
SOURCE_DIR := src
INCLUDE_DIR := include
all : dirs main
main: $(SOURCE_DIR)/main.c
gcc -o $(BUILD_DIR)/main $(SOURCE_DIR)/main.c -L$(INCLUDE_DIR) -lsimpleaudio -lmpg123 -lao -lpthread -lm
dirs:
mkdir -p $(INCLUDE_DIR)
mkdir -p $(BUILD_DIR)
mkdir -p $(SOURCE_DIR)
.PHONY : clean
clean:
rm -r $(BUILD_DIR)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels