SCDoc: Use proper static string constants instead of comparing string literals.
[supercollider.git] / include / server / SC_WorldOptions.h
blob34ba6268172a3c950e71b937e9de7af8bf912849
1 /*
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_
25 #include <stdarg.h>
26 #include "SC_Reply.h"
27 #include "SC_Types.h"
28 #include "SC_Export.h"
30 typedef int (*PrintFunc)(const char *format, va_list ap);
32 struct WorldOptions
34 const char* mPassword;
35 uint32 mNumBuffers;
36 uint32 mMaxLogins;
37 uint32 mMaxNodes;
38 uint32 mMaxGraphDefs;
39 uint32 mMaxWireBufs;
40 uint32 mNumAudioBusChannels;
41 uint32 mNumInputBusChannels;
42 uint32 mNumOutputBusChannels;
43 uint32 mNumControlBusChannels;
44 uint32 mBufLength;
45 uint32 mRealTimeMemorySize;
47 int mNumSharedControls;
48 float *mSharedControls;
50 bool mRealTime;
51 bool mMemoryLocking;
53 const char *mNonRealTimeCmdFilename;
54 const char *mNonRealTimeInputFilename;
55 const char *mNonRealTimeOutputFilename;
56 const char *mNonRealTimeOutputHeaderFormat;
57 const char *mNonRealTimeOutputSampleFormat;
59 uint32 mPreferredSampleRate;
60 uint32 mNumRGens;
62 uint32 mPreferredHardwareBufferFrameSize;
64 uint32 mLoadGraphDefs;
66 const char *mInputStreamsEnabled;
67 const char *mOutputStreamsEnabled;
68 const char *mInDeviceName;
70 int mVerbosity;
72 bool mRendezvous;
74 const char *mUGensPluginPath;
76 const char *mOutDeviceName;
78 const char *mRestrictedPath;
80 int mSharedMemoryID;
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
86 #if defined(_WIN32)
87 ,44100
88 #else
90 #endif
91 ,64, 0, 1
92 ,0, 0, 0
101 struct SndBuf;
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_