| 1 |
/* |
|---|
| 2 |
* Sweep, a sound wave editor. |
|---|
| 3 |
* |
|---|
| 4 |
* Copyright (C) 2000 Conrad Parker |
|---|
| 5 |
* |
|---|
| 6 |
* This program is free software; you can redistribute it and/or modify |
|---|
| 7 |
* it under the terms of the GNU General Public License as published by |
|---|
| 8 |
* the Free Software Foundation; either version 2 of the License, or |
|---|
| 9 |
* (at your option) any later version. |
|---|
| 10 |
* |
|---|
| 11 |
* This program 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 |
|---|
| 14 |
* GNU General Public License for more details. |
|---|
| 15 |
* |
|---|
| 16 |
* You should have received a copy of the GNU General Public License |
|---|
| 17 |
* along with this program; if not, write to the Free Software |
|---|
| 18 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|---|
| 19 |
*/ |
|---|
| 20 |
|
|---|
| 21 |
#ifndef __HEAD_H__ |
|---|
| 22 |
#define __HEAD_H__ |
|---|
| 23 |
|
|---|
| 24 |
#include <gtk/gtk.h> |
|---|
| 25 |
|
|---|
| 26 |
#include "sweep_app.h" |
|---|
| 27 |
|
|---|
| 28 |
#define HEAD_LOCK(h,e) \ |
|---|
| 29 |
g_mutex_lock ((h)->head_mutex); \ |
|---|
| 30 |
(e); \ |
|---|
| 31 |
g_mutex_unlock ((h)->head_mutex); |
|---|
| 32 |
|
|---|
| 33 |
#define HEAD_SET_GOING(h,s) HEAD_LOCK((h), (h)->going = (s)) |
|---|
| 34 |
|
|---|
| 35 |
void |
|---|
| 36 |
head_controller_set_head (sw_head_controller * hctl, sw_head * head); |
|---|
| 37 |
|
|---|
| 38 |
GtkWidget * |
|---|
| 39 |
head_controller_create (sw_head * head, GtkWidget * window, |
|---|
| 40 |
sw_head_controller ** hctl_ret); |
|---|
| 41 |
|
|---|
| 42 |
sw_head * |
|---|
| 43 |
head_new (sw_sample * sample, sw_head_t head_type); |
|---|
| 44 |
|
|---|
| 45 |
void |
|---|
| 46 |
head_set_scrubbing (sw_head * h, gboolean scrubbing); |
|---|
| 47 |
|
|---|
| 48 |
void |
|---|
| 49 |
head_set_previewing (sw_head * h, gboolean previewing); |
|---|
| 50 |
|
|---|
| 51 |
void |
|---|
| 52 |
head_set_looping (sw_head * h, gboolean looping); |
|---|
| 53 |
|
|---|
| 54 |
void |
|---|
| 55 |
head_set_reverse (sw_head * h, gboolean reverse); |
|---|
| 56 |
|
|---|
| 57 |
void |
|---|
| 58 |
head_set_mute (sw_head * h, gboolean mute); |
|---|
| 59 |
|
|---|
| 60 |
void |
|---|
| 61 |
head_set_going (sw_head * h, gboolean going); |
|---|
| 62 |
|
|---|
| 63 |
void |
|---|
| 64 |
head_set_restricted (sw_head * h, gboolean restricted); |
|---|
| 65 |
|
|---|
| 66 |
void |
|---|
| 67 |
head_set_stop_offset (sw_head * h, sw_framecount_t offset); |
|---|
| 68 |
|
|---|
| 69 |
void |
|---|
| 70 |
head_set_gain (sw_head * h, gfloat gain); |
|---|
| 71 |
|
|---|
| 72 |
void |
|---|
| 73 |
head_set_rate (sw_head * h, gfloat rate); |
|---|
| 74 |
|
|---|
| 75 |
void |
|---|
| 76 |
head_set_offset (sw_head * h, sw_framecount_t offset); |
|---|
| 77 |
|
|---|
| 78 |
void |
|---|
| 79 |
head_set_monitor (sw_head * h, gboolean monitor); |
|---|
| 80 |
|
|---|
| 81 |
sw_framecount_t |
|---|
| 82 |
head_read (sw_head * head, sw_audio_t * buf, sw_framecount_t count, |
|---|
| 83 |
int driver_rate); |
|---|
| 84 |
|
|---|
| 85 |
sw_framecount_t |
|---|
| 86 |
head_write (sw_head * head, sw_audio_t * buf, sw_framecount_t count); |
|---|
| 87 |
|
|---|
| 88 |
#endif /* __HEAD_H__ */ |
|---|