Miam-Player  0.8.0
A nice music player
audio_fifo.h
Go to the documentation of this file.
1 /*
2  * Audio FIFO
3  * Copyright (c) 2012 Justin Ruggles <justin.ruggles@gmail.com>
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
27 #ifndef AVUTIL_AUDIO_FIFO_H
28 #define AVUTIL_AUDIO_FIFO_H
29 
30 #include "avutil.h"
31 #include "fifo.h"
32 #include "samplefmt.h"
33 
49 typedef struct AVAudioFifo AVAudioFifo;
50 
57 
66 AVAudioFifo *av_audio_fifo_alloc(enum AVSampleFormat sample_fmt, int channels,
67  int nb_samples);
68 
77 int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples);
78 
95 int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples);
96 
111 int av_audio_fifo_peek(AVAudioFifo *af, void **data, int nb_samples);
112 
128 int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offset);
129 
144 int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples);
145 
155 int av_audio_fifo_drain(AVAudioFifo *af, int nb_samples);
156 
165 
173 
181 
187 #endif /* AVUTIL_AUDIO_FIFO_H */
AVAudioFifo * av_audio_fifo_alloc(enum AVSampleFormat sample_fmt, int channels, int nb_samples)
int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples)
void av_audio_fifo_free(AVAudioFifo *af)
int av_audio_fifo_space(AVAudioFifo *af)
struct AVAudioFifo AVAudioFifo
Definition: audio_fifo.h:49
int av_audio_fifo_size(AVAudioFifo *af)
av_warn_unused_result int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples)
AVSampleFormat
Definition: samplefmt.h:58
int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples)
#define av_warn_unused_result
Definition: attributes.h:58
int av_audio_fifo_drain(AVAudioFifo *af, int nb_samples)
int av_audio_fifo_peek(AVAudioFifo *af, void **data, int nb_samples)
int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offset)
void av_audio_fifo_reset(AVAudioFifo *af)