|
Blender
V2.59
|
00001 /* 00002 * $Id: BKE_sound.h 36092 2011-04-10 22:40:37Z nexyon $ 00003 * 00004 * ***** BEGIN GPL LICENSE BLOCK ***** 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * as published by the Free Software Foundation; either version 2 00009 * of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software Foundation, 00018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 * 00020 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00021 * All rights reserved. 00022 * 00023 * The Original Code is: all of this file. 00024 * 00025 * Contributor(s): none yet. 00026 * 00027 * ***** END GPL LICENSE BLOCK ***** 00028 */ 00029 #ifndef BKE_SOUND_H 00030 #define BKE_SOUND_H 00031 00038 struct PackedFile; 00039 struct bSound; 00040 struct bContext; 00041 struct ListBase; 00042 struct Main; 00043 struct Sequence; 00044 00045 void sound_init_once(void); 00046 00047 void sound_init(struct Main *main); 00048 00049 void sound_exit(void); 00050 00051 void sound_force_device(int device); 00052 int sound_define_from_str(const char *str); 00053 00054 struct bSound* sound_new_file(struct Main *main, const char *filename); 00055 00056 // XXX unused currently 00057 #if 0 00058 struct bSound* sound_new_buffer(struct bContext *C, struct bSound *source); 00059 00060 struct bSound* sound_new_limiter(struct bContext *C, struct bSound *source, float start, float end); 00061 #endif 00062 00063 void sound_delete(struct bContext *C, struct bSound* sound); 00064 00065 void sound_cache(struct bSound* sound, int ignore); 00066 00067 void sound_delete_cache(struct bSound* sound); 00068 00069 void sound_load(struct Main *main, struct bSound* sound); 00070 00071 void sound_free(struct bSound* sound); 00072 00073 #ifdef AUD_CAPI 00074 AUD_Device* sound_mixdown(struct Scene *scene, AUD_DeviceSpecs specs, int start, float volume); 00075 #endif 00076 00077 void sound_create_scene(struct Scene *scene); 00078 00079 void sound_destroy_scene(struct Scene *scene); 00080 00081 void sound_mute_scene(struct Scene *scene, int muted); 00082 00083 void* sound_scene_add_scene_sound(struct Scene *scene, struct Sequence* sequence, int startframe, int endframe, int frameskip); 00084 00085 void* sound_add_scene_sound(struct Scene *scene, struct Sequence* sequence, int startframe, int endframe, int frameskip); 00086 00087 void sound_remove_scene_sound(struct Scene *scene, void* handle); 00088 00089 void sound_mute_scene_sound(struct Scene *scene, void* handle, char mute); 00090 00091 void sound_move_scene_sound(struct Scene *scene, void* handle, int startframe, int endframe, int frameskip); 00092 00093 void sound_play_scene(struct Scene *scene); 00094 00095 void sound_stop_scene(struct Scene *scene); 00096 00097 void sound_seek_scene(struct bContext *C); 00098 00099 float sound_sync_scene(struct Scene *scene); 00100 00101 int sound_scene_playing(struct Scene *scene); 00102 00103 int sound_read_sound_buffer(struct bSound* sound, float* buffer, int length, float start, float end); 00104 00105 int sound_get_channels(struct bSound* sound); 00106 00107 #endif