~q3cpma/mus

ref: cf29c2237d0c99e5240a55895c07564ef4635392 mus/mus_player/decoder.h -rw-r--r-- 662 bytes
cf29c223q3cpma Add a #pragma once to the new xoshiro128plus.h header 1 year, 7 months ago
                                                                                
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
#pragma once

#include <pthread.h>
#include <stdbool.h>

#include "tag.h"
#include "track_info.h"


/* Struct to pass stuff around with the stream decoder */
typedef struct
{
    Track_info *tinfo; /* Shared structure with main() */
	int cur_fd, next_fd;
	ReplayGain_type rgtype;
	_Atomic bool cancel_flag; /* To be killed by main() */
	int pipefd_wr; /* Where to write the decoded PCM */
	pthread_t tid;
	void *ctx;
} Decoder;


bool decoder_init(Decoder *dec, int pipefd_wr, Track_info *tinfo,
	ReplayGain_type rgtype, const char *next);

void decoder_clear(const Decoder *dec);

void decoder_end(const Decoder *dec);

bool decoder_spawn_thread(Decoder *dec);