-
Notifications
You must be signed in to change notification settings - Fork 13
/
shoutcast.h
31 lines (21 loc) · 985 Bytes
/
shoutcast.h
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
#ifndef TINY_SPOTIFY_SHOUTCAST_H_
#define TINY_SPOTIFY_SHOUTCAST_H_
#include "types.h"
#include "tiny_spotify.h"
typedef struct Shoutcast Shoutcast;
// Create an instance of the shoutcast streamer
Shoutcast *ShoutcastCreate(Tsp *tsp);
// Destroy the shoutcast streamer
void ShoutcastDestroy(Shoutcast *shoutcast);
// Start listening on a port for incoming shoutcast connections
bool ShoutcastListen(Shoutcast *shoutcast, int port);
// Push bytes to the shoutcast streamer. This function will not accept
// bytes unless there's at least one connection.
int ShoutcastWavPush(void *context, int flags,
const TspSampleType *datai, int sizei,
const TspSampleFormat *sample_format, int *samples_buffered);
// Set the name of the now playing track
void ShoutcastSetNowPlaying(Shoutcast *shoutcast, TspItem *item);
// Return the number of connected clients
int ShoutcastNumClients(Shoutcast *shoutcast);
#endif // TINY_SPOTIFY_SHOUTCAST_H_