#include "replay_gain_info.h"
#include "audio_format.h"
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
Go to the source code of this file.
- Enumerator:
-
Definition at line 33 of file chunk.h.
Checks if the audio format if the chunk is equal to the specified audio_format.
Increases the length of the chunk after the caller has written to the buffer returned by music_chunk_write().
- Parameters
-
chunk | the music_chunk object |
audio_format | the audio format for the appended data; must stay the same for the life cycle of this chunk |
length | the number of bytes which were appended |
- Returns
- true if the chunk is full
static bool music_chunk_is_empty |
( |
const struct music_chunk * |
chunk | ) |
|
|
inlinestatic |
void* music_chunk_write |
( |
struct music_chunk * |
chunk, |
|
|
const struct audio_format * |
audio_format, |
|
|
float |
data_time, |
|
|
uint16_t |
bit_rate, |
|
|
size_t * |
max_length_r |
|
) |
| |
Prepares appending to the music chunk.
Returns a buffer where you may write into. After you are finished, call music_chunk_expand().
- Parameters
-
chunk | the music_chunk object |
audio_format | the audio format for the appended data; must stay the same for the life cycle of this chunk |
data_time | the time within the song |
bit_rate | the current bit rate of the source file |
max_length_r | the maximum write length is returned here |
- Returns
- a writable buffer, or NULL if the chunk is full