2 SuperCollider real time audio synthesis system
3 Copyright (c) 2002 James McCartney. All rights reserved.
4 http://www.audiosynth.com
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.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 #ifndef _SC_WorldOptions_
23 #define _SC_WorldOptions_
28 #include "SC_Export.h"
30 typedef int (*PrintFunc
)(const char *format
, va_list ap
);
34 const char* mPassword
;
40 uint32 mNumAudioBusChannels
;
41 uint32 mNumInputBusChannels
;
42 uint32 mNumOutputBusChannels
;
43 uint32 mNumControlBusChannels
;
45 uint32 mRealTimeMemorySize
;
47 int mNumSharedControls
;
48 float *mSharedControls
;
53 const char *mNonRealTimeCmdFilename
;
54 const char *mNonRealTimeInputFilename
;
55 const char *mNonRealTimeOutputFilename
;
56 const char *mNonRealTimeOutputHeaderFormat
;
57 const char *mNonRealTimeOutputSampleFormat
;
59 uint32 mPreferredSampleRate
;
62 uint32 mPreferredHardwareBufferFrameSize
;
64 uint32 mLoadGraphDefs
;
66 const char *mInputStreamsEnabled
;
67 const char *mOutputStreamsEnabled
;
68 const char *mInDeviceName
;
74 const char *mUGensPluginPath
;
76 const char *mOutDeviceName
;
78 const char *mRestrictedPath
;
83 const struct WorldOptions kDefaultWorldOptions
=
85 0,1024,64,1024,1024,64,128,8,8,4096,64,8192, 0,0, 1, 0, 0,0,0,0,0
103 SC_DLLEXPORT_C
void SetPrintFunc(PrintFunc func
);
104 SC_DLLEXPORT_C
struct World
* World_New(struct WorldOptions
*inOptions
);
105 SC_DLLEXPORT_C
void World_Cleanup(struct World
*inWorld
);
106 SC_DLLEXPORT_C
void World_NonRealTimeSynthesis(struct World
*inWorld
, struct WorldOptions
*inOptions
);
107 SC_DLLEXPORT_C
int World_OpenUDP(struct World
*inWorld
, int inPort
);
108 SC_DLLEXPORT_C
int World_OpenTCP(struct World
*inWorld
, int inPort
, int inMaxConnections
, int inBacklog
);
109 SC_DLLEXPORT_C
void World_WaitForQuit(struct World
*inWorld
);
110 SC_DLLEXPORT_C
bool World_SendPacket(struct World
*inWorld
, int inSize
, char *inData
, ReplyFunc inFunc
);
111 SC_DLLEXPORT_C
bool World_SendPacketWithContext(struct World
*inWorld
, int inSize
, char *inData
, ReplyFunc inFunc
, void *inContext
);
112 SC_DLLEXPORT_C
int World_CopySndBuf(struct World
*world
, uint32 index
, struct SndBuf
*outBuf
, bool onlyIfChanged
, bool *didChange
);
113 SC_DLLEXPORT_C
int scprintf(const char *fmt
, ...);
115 #endif // _SC_WorldOptions_