/* * The Real SoundTracker - sample editor (header) * * Copyright (C) 1998-2019 Michael Krause * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _SAMPLE_EDITOR_H #define _SAMPLE_EDITOR_H #include "driver.h" #include "sample-display.h" #include "xm.h" #include typedef enum { SAMPLE_EDITOR_DISPLAY_EDITOR = 0, SAMPLE_EDITOR_DISPLAY_SAMPLING } SampleEditorDisplay; typedef enum { SAMPLE_EDITOR_VOLUME = 0, SAMPLE_EDITOR_PANNING, SAMPLE_EDITOR_FINETUNE, SAMPLE_EDITOR_RELNOTE, SAMPLE_EDITOR_SPIN_LAST } SampleEditorSpin; typedef struct _STSampleChain STSampleChain; struct _STSampleChain { STSampleChain* next; guint length; void* data; }; void sample_editor_page_create(GtkNotebook* nb); gboolean sample_editor_handle_keys(int shift, int ctrl, int alt, guint32 keyval, gboolean pressed); void sample_editor_set_sample(STSample*); void sample_editor_update(void); void sample_editor_stop_sampling(void); void sample_editor_clear_buffers(STSampleChain* bufs); void sample_editor_chain_to_sample(STSampleChain *bufs, guint32 rlen, STMixerFormat fmt, guint32 srate, const gboolean data_present, const gchar* samplename, const gchar* action, const gchar* log_name); void sample_editor_start_updating(void); void sample_editor_stop_updating(void); void sample_editor_copy_cut_common(gboolean copy, gboolean spliceout); void sample_editor_paste_clicked(void); void sample_editor_xcopy_samples(STSample* src_smp, STSample* dest_smp, const gboolean xchg); gboolean sample_editor_check_and_log_sample(STSample* sample, const gchar* title, const gint flags, const gsize data_length); extern st_driver* sampling_driver; extern void* sampling_driver_object; void sample_editor_set_mode(SampleEditorDisplay, SampleDisplayMode); GtkAdjustment* sample_editor_get_adjustment(SampleEditorSpin); void sample_editor_update_status(void); gboolean sample_editor_sampled(void* src, guint32 count, gint mixfreq, gint mixformat); #endif /* _SAMPLE_EDITOR_H */