mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-22 05:26:17 +02:00
28 lines
544 B
C
28 lines
544 B
C
#ifndef CHUNK_H
|
|
#define CHUNK_H
|
|
|
|
#define SAMPLE_RATE (48000)
|
|
//#define SAMPLE_BIT (16)
|
|
#define CHANNELS (2)
|
|
|
|
#define WIRE_CHUNK_MS (50)
|
|
#define WIRE_CHUNK_SIZE ((SAMPLE_RATE*CHANNELS*WIRE_CHUNK_MS)/1000)
|
|
|
|
#define PLAYER_CHUNK_MS (10)
|
|
#define PLAYER_CHUNK_SIZE ((SAMPLE_RATE*CHANNELS*PLAYER_CHUNK_MS)/1000)
|
|
#define PLAYER_CHUNK_MS_SIZE ((SAMPLE_RATE*CHANNELS)/1000)
|
|
#define FRAMES_PER_BUFFER ((SAMPLE_RATE*PLAYER_CHUNK_MS)/1000)
|
|
|
|
|
|
struct Chunk
|
|
{
|
|
int32_t tv_sec;
|
|
int32_t tv_usec;
|
|
int32_t idx;
|
|
int16_t payload[WIRE_CHUNK_SIZE];
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|