2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3 * Library <2001> Thomas Vander Stichele <thomas@apestaart.org>
4 * <2011> Wim Taymans <wim.taymans@gmail.com>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #ifndef __GST_AUDIO_AUDIO_H__
23 #define __GST_AUDIO_AUDIO_H__
26 #include <gst/audio/audio-enumtypes.h>
27 #include <gst/audio/audio-format.h>
28 #include <gst/audio/audio-channels.h>
29 #include <gst/audio/audio-info.h>
33 /* conversion macros */
35 * GST_FRAMES_TO_CLOCK_TIME:
36 * @frames: sample frames
37 * @rate: sampling rate
39 * Calculate clocktime from sample @frames and @rate.
41 #define GST_FRAMES_TO_CLOCK_TIME(frames, rate) \
42 ((GstClockTime) gst_util_uint64_scale_round (frames, GST_SECOND, rate))
45 * GST_CLOCK_TIME_TO_FRAMES:
46 * @clocktime: clock time
47 * @rate: sampling rate
49 * Calculate frames from @clocktime and sample @rate.
51 #define GST_CLOCK_TIME_TO_FRAMES(clocktime, rate) \
52 gst_util_uint64_scale_round (clocktime, rate, GST_SECOND)
55 * this library defines and implements some helper functions for audio
59 GstBuffer * gst_audio_buffer_clip (GstBuffer *buffer, GstSegment *segment,
65 #endif /* __GST_AUDIO_AUDIO_H__ */