﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3AHcube%2FSummerOfCode2007</id>
	<title>利用者:Hcube/SummerOfCode2007 - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3AHcube%2FSummerOfCode2007"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Hcube/SummerOfCode2007&amp;action=history"/>
	<updated>2026-07-31T10:22:56Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Hcube/SummerOfCode2007&amp;diff=54682&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Hcube/SummerOfCode2007&amp;diff=54682&amp;oldid=prev"/>
		<updated>2018-06-28T17:51:32Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2018年6月28日 (木) 17:51時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Yamyam</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Hcube/SummerOfCode2007&amp;diff=54681&amp;oldid=prev</id>
		<title>wiki&gt;Hcube: /* Blender Audio System Cleanup and Upgade */</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Hcube/SummerOfCode2007&amp;diff=54681&amp;oldid=prev"/>
		<updated>2008-08-21T09:05:57Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Blender Audio System Cleanup and Upgade&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Blender Audio System Cleanup and Upgade=&lt;br /&gt;
==Status==&lt;br /&gt;
This project is still running (2008.08.21). Unfortunatly it missed the 2.47 blender version, but hopefully will be included in the next release.&lt;br /&gt;
There are only few things remained for merging with trunk.&lt;br /&gt;
*game engine support&lt;br /&gt;
*sound normalization after resampling&lt;br /&gt;
*packed file support via libsndfile (currently it is supported only via ffmpeg)&lt;br /&gt;
&lt;br /&gt;
==Download from SVN==&lt;br /&gt;
svn co https://svn.blender.org/svnroot/bf-blender/branches/sound-branch&lt;br /&gt;
&lt;br /&gt;
==Proposal==&lt;br /&gt;
[[User:Hcube/SummerOfCode2007/Proposal]]&lt;br /&gt;
&lt;br /&gt;
==Changes since the proposal==&lt;br /&gt;
*drop away SoundSystem code&lt;br /&gt;
*make a completely new lib with clean design: tinySND&lt;br /&gt;
*the main motivation is getting blender's audio to work and make the new audio system well extensible for future.&lt;br /&gt;
&lt;br /&gt;
==Problems with current blender audio system==&lt;br /&gt;
Mixture use of SDL and openal. SDL is used for sequencing, mixing, openal is used for game engine sound. These two system cant be used parallel.&lt;br /&gt;
There is also an inner dependency due to hdaudio is using ffmpeg.&lt;br /&gt;
From programmer's view the audio code is confusion too because the source is not centralized: SoundSystem, editsound.c, seqaudio.c implements different parts of audio features.&lt;br /&gt;
There is audio feature implementation code in gui related part of source: editsound.c&lt;br /&gt;
&lt;br /&gt;
==Cleanup goals==&lt;br /&gt;
It would be nice to unify every audio code into one library. It will give a more clean design and it can be more easily maintained too.&lt;br /&gt;
We have to include further feature extensibility as a requirement, because without that after a long time we will get confusions in source code again.&lt;br /&gt;
(New features are always coming.)&lt;br /&gt;
&lt;br /&gt;
==Cleanup requirements==&lt;br /&gt;
*no feature loss&lt;br /&gt;
*clean blender side source code&lt;br /&gt;
*extensible sound system source code (Not an openal wrapper)&lt;br /&gt;
&lt;br /&gt;
==Cleanup analysis and design==&lt;br /&gt;
After i've spent a lot of time to learn current SoundSystem, i've found that is specialized for openal or fmod like 3D APIs. Actually it is a wrapper for them.&lt;br /&gt;
At blender side, the situation is more chaotic. There are several sound related source files and the solutions were too complex.&lt;br /&gt;
Ex: the SoundSytem was not used, instead SDL was used in several times. FFmpeg was used directly.&lt;br /&gt;
The ideal solution is putting every sound related implementation out from blender core code. ex to SoundSystem, but it has no 2d sound implementations.&lt;br /&gt;
And it has no real feature implementation code, only it wraps openal and fmod.&lt;br /&gt;
&lt;br /&gt;
SoundSystem problems:&lt;br /&gt;
*no file load/save api&lt;br /&gt;
*whole api is concentrate on 3d sound&lt;br /&gt;
*lacks of real feature implementations(only wraps external libs)&lt;br /&gt;
&lt;br /&gt;
Due to these i've begun designed a new SoundSystem lib. It has taken me one week. I've not designed it alone, i discussed the requirements with Bob and schlaile.&lt;br /&gt;
The original concept was that SDL will be the only dependency.&lt;br /&gt;
&lt;br /&gt;
===Bob's requirements===&lt;br /&gt;
I would like to see the following use cases thought through and posted:&lt;br /&gt;
* basic wave reader/writer (Explicit task)&lt;br /&gt;
* basic aiff reader/writer (Explicit task)&lt;br /&gt;
* additional formats loaded via ffmpeg (Implied task)&lt;br /&gt;
* loading a sound (of different types) &lt;br /&gt;
* playing a sound &lt;br /&gt;
* playing multiple sounds &lt;br /&gt;
* sync with animation (including scrubs) (Explicit task)&lt;br /&gt;
* API spec (Explicit task)&lt;br /&gt;
&lt;br /&gt;
===schlaile's requirements===&lt;br /&gt;
Schlaile is currently working on a generic plugin system.&lt;br /&gt;
*sdl independent, make backends pluggable&lt;br /&gt;
*jack backend. It allows cooperation with professional audio editors which supports jack like ardour.&lt;br /&gt;
&lt;br /&gt;
===hcube's requirements===&lt;br /&gt;
I want something more than play/stop. I want features that are useful for gaming or making movie.&lt;br /&gt;
*keep extensible.&lt;br /&gt;
*[[Uni-Verse:UVAS]] module (later) Can be used for baking surround sounds (5.1 or 7.1, etc)&lt;br /&gt;
*LADSPA module (later)&lt;br /&gt;
&lt;br /&gt;
The audio code consist of two parts:&lt;br /&gt;
*Blender side code. That handles sequencing, and handles bSound and bSample structure, but does not implements any sound playing feature, only calls the (new)SoundSystem lib.&lt;br /&gt;
*(new)SoundSystem lib. This implements every feature what we need. (load,save,play,stop,mixdown,conversions,etc)&lt;br /&gt;
&lt;br /&gt;
After a week of designing i've got the final design and i found that is very generic. The new SoundSystem's name is tinySND.&lt;br /&gt;
Old SoundSystem and new SoundSystem (tinySND) are not blender specific.&lt;br /&gt;
That is not a problem because ex: we can add features to them without changing blender's file structure.&lt;br /&gt;
&lt;br /&gt;
==tinySND==&lt;br /&gt;
This the new sound library it is named because it is blender independent and i'd like to release it as an independent sound library. It is written in C++.&lt;br /&gt;
It is very modular and simple and customizable.&lt;br /&gt;
It will have nice features:&lt;br /&gt;
*backends: SDL, portaudio, jack&lt;br /&gt;
*file handler backends: internal(wav, aiff), sndfile, ffmpeg&lt;br /&gt;
*components:&lt;br /&gt;
**ladspa module&lt;br /&gt;
**sample rate converter module&lt;br /&gt;
**mixer module&lt;br /&gt;
**UVAS module for 3d acoustics&lt;br /&gt;
&lt;br /&gt;
===Design===&lt;br /&gt;
tinySND is based on 3 interface classes:&lt;br /&gt;
*SND_Device: abstract interface for audio backends.&lt;br /&gt;
*SND_DataProvider: abstract interface for audio file handling backends.&lt;br /&gt;
*SND_SoundInterface: abstract interface for all audio components&lt;br /&gt;
&lt;br /&gt;
===tinySND SND_Device Backends===&lt;br /&gt;
*SDL       [done]&lt;br /&gt;
*portaudio [done]&lt;br /&gt;
*jack      [done]&lt;br /&gt;
&lt;br /&gt;
===tinySND SND_DataProvider Backends===&lt;br /&gt;
*sndfile       [done]&lt;br /&gt;
*vorbis(ogg)   [done]&lt;br /&gt;
*mad(mp3)      [in progress]&lt;br /&gt;
*ffmpeg        [in progress]&lt;br /&gt;
*internal WAV  [planned]&lt;br /&gt;
*internal AIFF [planned]&lt;br /&gt;
&lt;br /&gt;
===tinySND Components===&lt;br /&gt;
*Mixer&lt;br /&gt;
*SampleRateConverter&lt;br /&gt;
*Sample - Loopable sound sample.&lt;br /&gt;
*Ladspa module (Future plan)-  Useful for realtime game audio effects.&lt;br /&gt;
*3D Simulation module (Future plan) - Useful for surround sound baking. (ex 5.1)&lt;br /&gt;
&lt;br /&gt;
==Blender side==&lt;br /&gt;
feature dependency flow:&lt;br /&gt;
BSE_seqaudio.h =&amp;gt; BAU_soundsystem.h =&amp;gt; tinySND&lt;br /&gt;
&lt;br /&gt;
===BAU_soundsystem.h===&lt;br /&gt;
&lt;br /&gt;
 typedef void audio_callbackfunction( int framesNum, void *userData1, void *userData2 );&lt;br /&gt;
&lt;br /&gt;
 // general functions&lt;br /&gt;
 void    audio_initialize(void);&lt;br /&gt;
 int     audio_isinitialized(void);&lt;br /&gt;
 void    audio_finalize(void);&lt;br /&gt;
 int     audio_getmixrate(void);&lt;br /&gt;
 void	audio_setcallback(audio_callbackfunction *callbackFunction, void *userData1, void *userData2);&lt;br /&gt;
&lt;br /&gt;
 // file functions, used for mixdown&lt;br /&gt;
 // playing sound during writing into a file is disabled&lt;br /&gt;
 int     audio_file_openforwrite(char *name, int sampleRate);&lt;br /&gt;
 void    audio_file_writeframes(int framesNum);&lt;br /&gt;
 void    audio_file_close(void);&lt;br /&gt;
&lt;br /&gt;
 // mixbuffer functions, allows to reach mixed and multiplexed sound data.&lt;br /&gt;
 // now it supports signed 16 bit pcm data and 2 channel&lt;br /&gt;
 int     audio_mixbuffer_open(int sampleRate);&lt;br /&gt;
 void    audio_mixbuffer_fill(void *buffer, int framesNum);&lt;br /&gt;
 void    audio_mixbuffer_close(void);&lt;br /&gt;
	&lt;br /&gt;
 // bSample functions&lt;br /&gt;
 struct bSample* audio_sample_new(char *name);&lt;br /&gt;
 struct bSample* audio_sample_find(char *name);&lt;br /&gt;
 int             audio_sample_load(struct bSample* sample);&lt;br /&gt;
 void            audio_sample_unload(struct bSample* sample);&lt;br /&gt;
&lt;br /&gt;
 // pcm data parameters:  4KHz and 8 bit, it is just for visual purpuses&lt;br /&gt;
 char*           audio_sample_getvisualpcmdata(struct bSample *sample, int channelIdx);&lt;br /&gt;
&lt;br /&gt;
 // bSound functions&lt;br /&gt;
 // hint: a bSound-&amp;gt;sample cant be NULL, always have to be a valid pointer&lt;br /&gt;
 struct bSound*  audio_sound_new(char *name);&lt;br /&gt;
 void            audio_sound_delete(struct bSound* sound);&lt;br /&gt;
 struct bSound*  audio_sound_clone(struct bSound* originalsound);&lt;br /&gt;
 struct bSound*  audio_sound_findbyid(char *id_name);&lt;br /&gt;
&lt;br /&gt;
 int             audio_sound_isplaying(struct bSound *sound);&lt;br /&gt;
 void            audio_sound_play(struct bSound *sound);&lt;br /&gt;
 void            audio_sound_stop(struct bSound *sound);&lt;br /&gt;
&lt;br /&gt;
 int             audio_sound_getframeposition(struct bSound *sound);&lt;br /&gt;
 void            audio_sound_setframeposition(struct bSound *sound, int framePos);&lt;br /&gt;
&lt;br /&gt;
 // sound attributes&lt;br /&gt;
 float           audio_sound_getgain(struct bSound *sound);&lt;br /&gt;
 void            audio_sound_setgain(struct bSound *sound, float gain);&lt;br /&gt;
&lt;br /&gt;
 float           audio_sound_getpan(struct bSound *sound);&lt;br /&gt;
 void            audio_sound_setpan(struct bSound *sound, float pan);&lt;br /&gt;
&lt;br /&gt;
 int             audio_sound_ismuted(struct bSound *sound);&lt;br /&gt;
 void            audio_sound_setmute(struct bSound *sound, int mute);&lt;br /&gt;
&lt;br /&gt;
 // global sound functions&lt;br /&gt;
 void            audio_sound_stopall(void);&lt;br /&gt;
 void            audio_sound_loadall(void);&lt;br /&gt;
&lt;br /&gt;
===BSE_seqaudio.h===&lt;br /&gt;
 void seqaudio_initialize(void);&lt;br /&gt;
 void seqaudio_finalize(void);&lt;br /&gt;
&lt;br /&gt;
 void seqaudio_play(void);&lt;br /&gt;
 void seqaudio_stop(void);&lt;br /&gt;
&lt;br /&gt;
 int  seqaudio_getframeposition(void);&lt;br /&gt;
 void seqaudio_scrub(void);&lt;br /&gt;
&lt;br /&gt;
 int  seqaudio_mixdown(char *fileName, int sampleRate);&lt;br /&gt;
&lt;br /&gt;
===blender side todo===&lt;br /&gt;
*support packed sound files&lt;br /&gt;
*support scrub [done]&lt;br /&gt;
*support sound seq pan,gain,mute [done]&lt;br /&gt;
*support seqaudio get pos and animation playback sync with sound [done]&lt;br /&gt;
*support mixdown sound feature [done]&lt;br /&gt;
*support sound wave drawing [done]&lt;br /&gt;
*support ffmpeg writing [done]&lt;br /&gt;
&lt;br /&gt;
==Compile guide==&lt;br /&gt;
Now i'm working on linux, ubuntu feisty fawn and debian etch 4.0 and i use scons for building.&lt;br /&gt;
There is an initial build scripts are made to support the new soundsystem.&lt;br /&gt;
For building my branch you need these libs:&lt;br /&gt;
*sdl: http://www.libsdl.org/&lt;br /&gt;
*portaudio: http://www.portaudio.com (v19 version, and dont forget to install c++ binding too)&lt;br /&gt;
*libsamplerate: http://www.mega-nerd.com/SRC/&lt;br /&gt;
*libsndfile: http://www.mega-nerd.com/libsndfile/&lt;br /&gt;
*libvorbis, libvorbisfile: http://xiph.org/downloads/&lt;br /&gt;
*libmad: http://www.underbit.com/products/mad/&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
device backend:&lt;br /&gt;
*SDL(optional)&lt;br /&gt;
*portaudio(optional)&lt;br /&gt;
*jack(optional)&lt;br /&gt;
&lt;br /&gt;
loader backend:&lt;br /&gt;
*internal(always, will be multi platform)&lt;br /&gt;
*ffmpeg(optional)&lt;br /&gt;
*libsndfile(optional)&lt;br /&gt;
*vorbis(optional)&lt;br /&gt;
*mad(optional)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*SDL - multi platform: Linux, Windows, Windows CE, BeOS, MacOS, Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX&lt;br /&gt;
*portaudio - multi platform: Windows, Macintosh (8,9,X), Unix (OSS), SGI, and BeOS&lt;br /&gt;
*libsamplerate - platform independent (Ansi C)&lt;br /&gt;
*libsndfile - multi platform: Unix, Win32, MacOS&lt;br /&gt;
&lt;br /&gt;
==Binary size==&lt;br /&gt;
Now openal(346kb) is not part of the sound system, it is removed&lt;br /&gt;
*tinySND: 170kb (without debug info)&lt;br /&gt;
*libsamplerate: 114kb&lt;br /&gt;
&lt;br /&gt;
==License==&lt;br /&gt;
All soundsystem code in blender and also tinySND's blender interface is released under GPLv2.&lt;br /&gt;
*BAU_soundsystem.h&lt;br /&gt;
*soundsystem.c&lt;br /&gt;
*BIF_seqaudio.h&lt;br /&gt;
*seqaudio.c&lt;br /&gt;
*files in tinySND/blender/ directory&lt;br /&gt;
**SND_C-api.h&lt;br /&gt;
**SND_C-api.cpp&lt;br /&gt;
&lt;br /&gt;
The tinySND library is released under LGPL.&lt;br /&gt;
&lt;br /&gt;
==After SOC todo list==&lt;br /&gt;
===Documentation===&lt;br /&gt;
*blender sound system overview&lt;br /&gt;
*tinySND overview (blender independent)&lt;br /&gt;
&lt;br /&gt;
===tinySND===&lt;br /&gt;
*DataConverter (any type -&amp;gt; float converter)		[not started]&lt;br /&gt;
*FXLADSPA			[not started]&lt;br /&gt;
*FXLV2PLUG			[not started]&lt;br /&gt;
*design CD API		[not started]&lt;br /&gt;
*ffmpegReader		[done]&lt;br /&gt;
*ffmpegWriter		[done]&lt;br /&gt;
*jack DataProvider&lt;br /&gt;
*wavReader			[in progress]&lt;br /&gt;
*wavWriter			[not started]&lt;br /&gt;
*aiffReader		[not started]&lt;br /&gt;
*aiffWriter		[not started]&lt;br /&gt;
*finish all portaudio, and SDL device features&lt;br /&gt;
*SND_Device's getChannelName implementation, supporting 5.1, etc&lt;br /&gt;
*make it possible to directly connect SND_DataProvider and SND_DataConsumer&lt;br /&gt;
*implement endian conversion in SND_DataMultiplexer&lt;br /&gt;
*optimize data conversion in SND_DataMultiplexer&lt;br /&gt;
&lt;br /&gt;
===tinySND's blender interface===&lt;br /&gt;
*add visual data cache system&lt;br /&gt;
*implement samplerate chain building if one is not enought for downsample&lt;br /&gt;
*reader/writer registration API [done]&lt;br /&gt;
*add API for device configuration [in progress]&lt;br /&gt;
&lt;br /&gt;
===Blender side===&lt;br /&gt;
*support sound seq ipos&lt;br /&gt;
*support packed sound files [done]&lt;br /&gt;
*add sound system config UI&lt;br /&gt;
*support blender game engine [in progress]&lt;br /&gt;
&lt;br /&gt;
===Future plans===&lt;br /&gt;
*design SND_FXLADSPA class (useful for adding innovative and interesting sound effects into games)&lt;br /&gt;
*design how to integrate UVAS&lt;br /&gt;
*add SSE optimalization&lt;br /&gt;
*design UI for FXLADSPA and FXUVAS in blender (Sound Nodes and 3d sound materials and sound baking)&lt;/div&gt;</summary>
		<author><name>wiki&gt;Hcube</name></author>
		
	</entry>
</feed>