Revision

View differences:

Source/NetworkSend.cpp
100 100
	objAddrs.push_back(this);//TODO: this line should be in the constructor, but something weird happens if
101 101
	// an instance of NetworkSend is then declared globally: the constructor gets called,
102 102
	// and objAddrs.size()==1 but when you get to setup, objAddrs.size() has reverted back to 0, without
103
	// any destructor being called in between ...
103
	// any destructor being called in between ... Have a look here
104
	// http://stackoverflow.com/questions/7542054/global-vector-emptying-itself-between-calls .
105
	// and maybe use accessor function instead of global, as was done in #1374
104 106
#endif /* USE_JUCE */
105 107
	cleanup();
106 108
	int numSamples=blockSize*4>4*channel.bufferLength ? blockSize*4 : 4*channel.bufferLength;
107
	channel.numBuffers= 1+numSamples/channel.bufferLength; //the +1 takes the ceil() of the division
109
	channel.numBuffers= (1+numSamples/channel.bufferLength) * 3; //the +1 takes the ceil() of the division
108 110
	channel.buffers=(float**)malloc(channel.numBuffers*sizeof(float*));
109 111
	printf("NumBuffers: %d\n", channel.numBuffers);
110 112
	if(channel.buffers==NULL)
......
122 124
	}
123 125
	if(channel.readyToBeSent==NULL || channel.doneOnTime==NULL)
124 126
		return;
125
	channel.writePointer=0;
127
	channel.writePointer=channel.headerLength;
126 128
	channel.writeBuffer=0;
127 129
	channel.readBuffer=0;
128 130
	setChannelNumber(aChannelNumber);
......
141 143
		channel.writePointer=channel.headerLength; //reset the writePointer
142 144
		channel.writeBuffer=(channel.writeBuffer+1); //switch buffer
143 145
		if(channel.writeBuffer==channel.numBuffers) // and wrap it
144
			channel.writeBuffer=0;
146
            channel.writeBuffer=0;
145 147
//		printf("WriteBuffer:%d\n", channel.writeBuffer);
146 148
		if(channel.doneOnTime[channel.writeBuffer]==false){ //check if this buffer's last sending has completed on time ...
147
			printf("Network buffer underrun. timestamp: %d :-{\n",
149
			printf("NetworkSend buffer underrun. timestamp: %d :-{\n",
148 150
					(int)channel.buffers[channel.writeBuffer][channel.headerTimestampIndex]);
149 151
		}
150 152
		channel.doneOnTime[channel.writeBuffer]=false; // ... and then reset the flag
......
185 187

  
186 188
void NetworkSend::setChannelNumber(int aChannelNumber){
187 189
	channel.channelNumber=aChannelNumber;
188
	for(int n=0; n<channel.numBuffers; n++){ //initialize the header
190
	for(int n=0; n < channel.numBuffers; n++){ //initialize the header
189 191
		channel.buffers[n][channel.headerChannelIndex]=channel.channelNumber;
190 192
		//add here more static header fields
191 193
	}
......
218 220
		}
219 221
#else
220 222
		udpClient.send(sourceBuffer, numBytesToSend);
223
//		printf("sent sourceBuffer: %d, channel: %f, timestamp: %f\n", channel.readBuffer, channel.buffers[channel.readBuffer][0],
224
//				channel.buffers[channel.readBuffer][1]);
221 225
		channel.doneOnTime[channel.readBuffer]=true;
222 226
#endif /* USE_JUCE */
223 227
		channel.readBuffer++;
......
240 244
		//  auto duration2 = std::chrono::duration_cast<std::chrono::microseconds>( t2 - t1 ).count();
241 245
		//  if(duration2>0)
242 246
			//  std::cout << "Duration is: " << duration2 <<". Whole loop is: " << duration1 << "\n"; 
243
		sleep(1);
247
		usleep(1000);
244 248
	}
245 249
#else
246 250
	threadRunning=true;
......
251 255
	threadRunning=false;
252 256
#endif
253 257
}
254
#ifdef USE_JUCE
255
#else
256
Scope::Scope(int aNumChannels):
257
		channels(aNumChannels)
258
{};
259
Scope::~Scope(){};
260

  
261
void Scope::log(int channel, float value){
262
	if(channel>=getNumChannels()) //TODO: assert this
263
		return;
264
	channels[channel].log(value);
265
}
266

  
267
void Scope::setup(){
268
	setup(44100, 9999, "127.0.0.1");
269
}
270

  
271
void Scope::setup(float sampleRate, int aPort, const char* aServer){
272
	for(int n=0; n<getNumChannels(); n++){
273
		channels[n].setup(sampleRate, 128, n, aPort, aServer); //TODO: replace 128 with the actual block size
274
	}
275
}
276

  
277
void Scope::setPort(int port){
278
	for(int n=0; n<getNumChannels(); n++){
279
		channels[n].setPort(port);
280
	}
281
}
282
void Scope::setPort(int channel, int aPort){
283
	channels[channel].setPort(aPort);
284
	printf("Channel %d is now sending to port %d\n", channel, aPort);
285
}
286

  
287
int Scope::getNumChannels(){
288
	return channels.size();
289
}
290

  
291
void Scope::sendData(){
292
	NetworkSend::sendAllData();
293
}
294
#endif
Source/PluginProcessor.cpp
159 159
    // when they first compile the plugin, but obviously you don't need to
160 160
    // this code if your algorithm already fills all the output channels.
161 161
    float* channel0 = buffer.getWritePointer (0);
162
    float* channel1 = buffer.getWritePointer (1);
163 162
    if(!receiveAudioThread.isListening()) {
164 163
		std::cout << "Not listening \n";
165 164
		return;
166 165
	}
167
    static float lastValue=0;
168 166
    float *udpBuffer=buffer.getWritePointer(0);
169 167
    receiveAudioThread.getSamplesSrc(udpBuffer, samplesPerBlock_, samplingRateRatio);
168
    static float phase = 0;
170 169
    for(int n=0; n<samplesPerBlock_; n++){
171
		static int count=0;
172
		networkSend.log(udpBuffer[n]); //loopback to the BBB!
173
		udpBuffer[n]=(count%500)>=250 ? 1: -1;
174
		count++;
170
//		static int count=0;
171
//		networkSend.log(sinf(phase)); //loopback to the BBB!
172
//        phase += 2 * M_PI * 124/44100.f;
173
//        if (phase >= 2 * M_PI)
174
//            phase -= 2 * M_PI;
175
//        count++;
176
//        
177
        networkSend.log(udpBuffer[n]);
175 178
    }
176 179
}
177 180

  
Source/ReceiveAudioThread.cpp
39 39
        //  for(int n=headerLength;n<lastValidPointer; n++){
40 40
            //  fprintf(fd2, "%f\n",buffer[n]); //DEBUG
41 41
        //  }
42
        writePointer=0; //and reset to beginning of the buffer
42
    	writePointer=0; //and reset to beginning of the buffer
43 43
    }
44 44
}
45 45
void ReceiveAudioThread::pushPayload(int startIndex){ //backup the payload samples that will be overwritten by the new header
......
54 54
}
55 55

  
56 56
int ReceiveAudioThread::readUdpToBuffer(){
57
    if(listening==false || bufferReady==false)
57

  
58
	if(listening==false || bufferReady==false)
58 59
        return 0;
59 60
    if(writePointer<0)
60 61
        return 0;
61 62
    if(socket.waitUntilReady(true, waitForSocketTime)){// TODO: if waitForSocketTime here is >>5, the
63
    	// destructor (always or sometimes) never actually gets called, despite run() returns ...see issue #1381
62 64
#ifdef USE_JUCE
63 65
#else
64 66
		lastTime=rt_timer_read();
65 67
//        rt_printf("lastTimeread= %llu\n", lastTime);
66 68
#endif /* USE_JUCE */
67
    	// destructor (always or sometimes) never actually gets called, despite run() returns ...see issue #1381
68 69
        pushPayload(writePointer); //backup headerLength samples. This could be skipped if writePointer==0
69 70
        //read header+payload
70 71
        int numBytes=socket.read(buffer+writePointer, bytesToRead, true); //read without waiting.
......
150 151
  //  fprintf(fd,"var=["); //DEBUG
151 152
  headerLength=2;
152 153
  payloadLength=300; //TODO: make sure that payloadLength and headerLength are the same as the client is sending.
153
  bufferLength=std::max(headerLength+(payloadLength*4), headerLength+(aSamplesPerBlock*4)); //there are many considerations that can be done here ...
154
  bufferLength=10 * std::max(headerLength+(payloadLength*4), headerLength+(aSamplesPerBlock*4)); //there are many considerations that can be done here ...
154 155
                      //We keep a headerLength padding at the beginning of the array to allow full reads from the socket
155 156
  buffer=(float*)malloc(sizeof(float)*bufferLength);
156 157
  if(buffer==NULL) // something wrong
......
203 204
    if(isListening()==false)
204 205
        return -1;
205 206
    static int numCalls=0;
206
    if(writePointer<0 || (numCalls&16383)==0){ //if writePointer has not been initalized yet ...
207
    if(writePointer<0 /*|| (numCalls&16383)==0*/){ //if writePointer has not been initalized yet ...
207 208
#ifdef USE_JUCE
208 209
#else //debug
209
    	rt_printf("reinit the writePointer, readPointer: %f;\n",readPointer);
210
    	readPointer=0;
210
    	readPointer = headerLength;
211 211
#endif /* USE_JUCE */
212
        writePointer=2*length;  // do it, so that it starts writing at a safety margin from where we write.
212
    	// this cumbersome line means: start writing at a position which is as close as possible
213
    	// to the center of the buffer, but still is aligned to (payloadLength*x)+headerLength
214
    	// thus allowing buffering to allow clock drift to go either way
215
        writePointer = headerLength + ((bufferLength-headerLength)/payloadLength/2)*payloadLength;
213 216
                            // This will help keeping them in sync.
214 217
                            //TODO: handle what happens when the remote stream is interrupted and then restarted
218
        printf("write pointer inited at: %d\n", writePointer);
215 219
    }
216 220
    numCalls++;
217 221
    if(length>lastValidPointer) { 
......
295 299
        sleep(sleepTime);
296 300
#else
297 301
		for(unsigned int n=0; n<ReceiveAudioThread::objAddrs.size(); n++){
298
//			printf("%d\n", n);
299 302
			ReceiveAudioThread::objAddrs[n]->readUdpToBuffer();
300 303
		}
301 304
		usleep(sleepTime); //TODO: use rt_task_sleep instead
udpReceive.jucer
3 3
<JUCERPROJECT id="ol0uiN" name="UdpIo" projectType="audioplug" version="1.0.0"
4 4
              bundleIdentifier="com.yourcompany.udpReceive" includeBinaryInAppConfig="1"
5 5
              buildVST="1" buildVST3="0" buildAU="0" buildRTAS="0" buildAAX="0"
6
              pluginName="udpReceive" pluginDesc="udpReceive" pluginManufacturer="yourcompany"
7
              pluginManufacturerCode="Manu" pluginCode="Plug" pluginChannelConfigs="{1, 1}, {2, 2}"
6
              pluginName="udpReceive" pluginDesc="udpReceive" pluginManufacturer="Bela"
7
              pluginManufacturerCode="Bela" pluginCode="UDPi" pluginChannelConfigs="{1, 1}, {2, 2}"
8 8
              pluginIsSynth="0" pluginWantsMidiIn="0" pluginProducesMidiOut="0"
9 9
              pluginSilenceInIsSilenceOut="0" pluginEditorRequiresKeys="0"
10 10
              pluginAUExportPrefix="udpReceiveAU" pluginRTASCategory="" aaxIdentifier="com.yourcompany.udpReceive"
11
              pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="3.2.0">
11
              pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="4.1.0"
12
              pluginIsMidiEffectPlugin="0">
12 13
  <MAINGROUP id="uxqTRv" name="UdpIo">
13 14
    <GROUP id="{161FE71E-7626-0EAD-6CDE-F95B233D2180}" name="Source">
14 15
      <FILE id="CiTjEk" name="NetworkSend.cpp" compile="1" resource="0" file="Source/NetworkSend.cpp"/>
......
27 28
    </GROUP>
28 29
  </MAINGROUP>
29 30
  <EXPORTFORMATS>
30
    <XCODE_MAC targetFolder="Builds/MacOSX" vstFolder="~/vstsdk2.4" postbuildCommand="&#13;&#10;# This script takes the build product and copies it to the AU, VST, VST3, RTAS and AAX folders, depending on &#13;&#10;# which plugin types you've built&#13;&#10;&#13;&#10;original=$CONFIGURATION_BUILD_DIR/$FULL_PRODUCT_NAME&#13;&#10;&#13;&#10;# this looks inside the binary to detect which platforms are needed.. &#13;&#10;copyAU=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'AudioUnit' | wc -l&#96;&#13;&#10;copyVST=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'VSTPlugin' | wc -l&#96;&#13;&#10;copyVST3=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'GetPluginFactory' | wc -l&#96;&#13;&#10;copyRTAS=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'CProcess' | wc -l&#96;&#13;&#10;copyAAX=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'ACFStartup' | wc -l&#96;&#13;&#10;&#13;&#10;if [ $copyAU -gt 0 ]; then&#13;&#10;  echo &quot;Copying to AudioUnit folder...&quot;&#13;&#10;  AU=~/Library/Audio/Plug-Ins/Components/$PRODUCT_NAME.component&#13;&#10;  if [ -d &quot;$AU&quot; ]; then &#13;&#10;    rm -r &quot;$AU&quot;&#13;&#10;  fi&#13;&#10;&#13;&#10;  cp -r &quot;$original&quot; &quot;$AU&quot;&#13;&#10;  sed -i &quot;&quot; -e 's/TDMwPTul/BNDLPTul/g' &quot;$AU/Contents/PkgInfo&quot;&#13;&#10;  sed -i &quot;&quot; -e 's/TDMw/BNDL/g' &quot;$AU/Contents/$INFOPLIST_FILE&quot;&#13;&#10;&#13;&#10;  # Fix info.plist for AUs built with Xcode 3&#13;&#10;  if [ -f &quot;$DEVELOPER_DIR/Library/Developer/CoreAudio/AudioUnits/AUPublic/AUBase/AUPlugInDispatch.cpp&quot; ]; then&#13;&#10;    echo&#13;&#10;  else&#13;&#10;    echo &quot;Removing AudioComponents entry from Info.plist because this is not a new-format AU&quot;&#13;&#10;    /usr/libexec/PlistBuddy -c &quot;Delete AudioComponents&quot; &quot;$AU/Contents/Info.plist&quot;&#13;&#10;  fi&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyVST -gt 0 ]; then&#13;&#10;  echo &quot;Copying to VST folder...&quot;&#13;&#10;  VST=~/Library/Audio/Plug-Ins/VST/$PRODUCT_NAME.vst&#13;&#10;  if [ -d &quot;$VST&quot; ]; then &#13;&#10;    rm -r &quot;$VST&quot;&#13;&#10;  fi&#13;&#10;&#13;&#10;  cp -r &quot;$original&quot; &quot;$VST&quot;&#13;&#10;  sed -i &quot;&quot; -e 's/TDMwPTul/BNDLPTul/g' &quot;$VST/Contents/PkgInfo&quot;&#13;&#10;  sed -i &quot;&quot; -e 's/TDMw/BNDL/g' &quot;$VST/Contents/$INFOPLIST_FILE&quot;&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyVST3 -gt 0 ]; then&#13;&#10;  echo &quot;Copying to VST3 folder...&quot;&#13;&#10;  VST3=~/Library/Audio/Plug-Ins/VST3/$PRODUCT_NAME.vst3&#13;&#10;  if [ -d &quot;$VST3&quot; ]; then &#13;&#10;    rm -r &quot;$VST3&quot;&#13;&#10;  fi&#13;&#10;&#13;&#10;  cp -r &quot;$original&quot; &quot;$VST3&quot;&#13;&#10;  sed -i &quot;&quot; -e 's/TDMwPTul/BNDLPTul/g' &quot;$VST3/Contents/PkgInfo&quot;&#13;&#10;  sed -i &quot;&quot; -e 's/TDMw/BNDL/g' &quot;$VST3/Contents/$INFOPLIST_FILE&quot;&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyRTAS -gt 0 ]; then&#13;&#10;  echo &quot;Copying to RTAS folder...&quot;&#13;&#10;  RTAS=/Library/Application\ Support/Digidesign/Plug-Ins/$PRODUCT_NAME.dpm&#13;&#10;  if [ -d &quot;$RTAS&quot; ]; then&#13;&#10;    rm -r &quot;$RTAS&quot;&#13;&#10;  fi&#13;&#10;&#13;&#10;  cp -r &quot;$original&quot; &quot;$RTAS&quot;&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyAAX -gt 0 ]; then&#13;&#10;  echo &quot;Copying to AAX folder...&quot;&#13;&#10;&#13;&#10;  if [ -d &quot;/Applications/ProTools_3PDev/Plug-Ins&quot; ]; then&#13;&#10;    AAX1=&quot;/Applications/ProTools_3PDev/Plug-Ins/$PRODUCT_NAME.aaxplugin&quot;&#13;&#10;&#13;&#10;    if [ -d &quot;$AAX1&quot; ]; then&#13;&#10;      rm -r &quot;$AAX1&quot;&#13;&#10;    fi&#13;&#10;&#13;&#10;    cp -R -H &quot;$original&quot; &quot;$AAX1&quot;&#13;&#10;  fi&#13;&#10;&#13;&#10;  if [ -d &quot;/Library/Application Support/Avid/Audio/Plug-Ins&quot; ]; then&#13;&#10;    AAX2=&quot;/Library/Application Support/Avid/Audio/Plug-Ins/$PRODUCT_NAME.aaxplugin&quot;&#13;&#10;&#13;&#10;    if [ -d &quot;$AAX2&quot; ]; then&#13;&#10;      rm -r &quot;$AAX2&quot;&#13;&#10;    fi&#13;&#10;&#13;&#10;    cp -R -H &quot;$original&quot; &quot;$AAX2&quot;&#13;&#10;  fi&#13;&#10;fi&#13;&#10;">
31
      <CONFIGURATIONS>
32
        <CONFIGURATION name="Release" osxSDK="default" osxCompatibility="default" osxArchitecture="default"
33
                       isDebug="0" optimisation="3" targetName="UpdReceive"/>
34
      </CONFIGURATIONS>
35
      <MODULEPATHS>
36
        <MODULEPATH id="juce_video" path="/Users/unmanaged/JUCE/modules"/>
37
        <MODULEPATH id="juce_opengl" path="/Users/unmanaged/JUCE/modules"/>
38
        <MODULEPATH id="juce_gui_extra" path="/Users/unmanaged/JUCE/modules"/>
39
        <MODULEPATH id="juce_gui_basics" path="/Users/unmanaged/JUCE/modules"/>
40
        <MODULEPATH id="juce_graphics" path="/Users/unmanaged/JUCE/modules"/>
41
        <MODULEPATH id="juce_events" path="/Users/unmanaged/JUCE/modules"/>
42
        <MODULEPATH id="juce_data_structures" path="/Users/unmanaged/JUCE/modules"/>
43
        <MODULEPATH id="juce_cryptography" path="/Users/unmanaged/JUCE/modules"/>
44
        <MODULEPATH id="juce_core" path="/Users/unmanaged/JUCE/modules"/>
45
        <MODULEPATH id="juce_audio_processors" path="/Users/unmanaged/JUCE/modules"/>
46
        <MODULEPATH id="juce_audio_plugin_client" path="/Users/unmanaged/JUCE/modules"/>
47
        <MODULEPATH id="juce_audio_basics" path="/Users/unmanaged/JUCE/modules"/>
48
      </MODULEPATHS>
49
    </XCODE_MAC>
50 31
    <LINUX_MAKE targetFolder="Builds/Linux" vstFolder="~/SDKs/vstsdk2.4" extraDefs="USE_JUCE">
51 32
      <CONFIGURATIONS>
52 33
        <CONFIGURATION name="Debug" libraryPath="/usr/X11R6/lib/" isDebug="1" optimisation="1"
......
69 50
        <MODULEPATH id="juce_audio_basics" path="/home/giulio/juce/modules"/>
70 51
      </MODULEPATHS>
71 52
    </LINUX_MAKE>
53
    <XCODE_MAC targetFolder="Builds/MacOSX" postbuildCommand="&#13;&#10;# This script takes the build product and copies it to the AU, VST, VST3, RTAS and AAX folders, depending on &#13;&#10;# which plugin types you've built&#13;&#10;&#13;&#10;original=$CONFIGURATION_BUILD_DIR/$FULL_PRODUCT_NAME&#13;&#10;&#13;&#10;# this looks inside the binary to detect which platforms are needed.. &#13;&#10;copyAU=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'AudioUnit' | wc -l&#96;&#13;&#10;copyVST=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'VSTPlugin' | wc -l&#96;&#13;&#10;copyVST3=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'GetPluginFactory' | wc -l&#96;&#13;&#10;copyRTAS=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'CProcess' | wc -l&#96;&#13;&#10;copyAAX=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'ACFStartup' | wc -l&#96;&#13;&#10;&#13;&#10;if [ $copyAU -gt 0 ]; then&#13;&#10;  echo &quot;Copying to AudioUnit folder...&quot;&#13;&#10;  AUDir=~/Library/Audio/Plug-Ins/Components&#13;&#10;  mkdir -p &quot;$AUDir&quot;&#13;&#10;  AU=$AUDir/$PRODUCT_NAME.component&#13;&#10;  if [ -d &quot;$AU&quot; ]; then &#13;&#10;    rm -r &quot;$AU&quot;&#13;&#10;  fi&#13;&#10;&#13;&#10;  cp -r &quot;$original&quot; &quot;$AU&quot;&#13;&#10;  sed -i &quot;&quot; -e 's/TDMwPTul/BNDLPTul/g' &quot;$AU/Contents/PkgInfo&quot;&#13;&#10;  sed -i &quot;&quot; -e 's/TDMw/BNDL/g' &quot;$AU/Contents/$INFOPLIST_FILE&quot;&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyVST -gt 0 ]; then&#13;&#10;  echo &quot;Copying to VST folder...&quot;&#13;&#10;  VSTDir=~/Library/Audio/Plug-Ins/VST&#13;&#10;  mkdir -p &quot;$VSTDir&quot;&#13;&#10;  VST=$VSTDir/$PRODUCT_NAME.vst&#13;&#10;  if [ -d &quot;$VST&quot; ]; then &#13;&#10;    rm -r &quot;$VST&quot;&#13;&#10;  fi&#13;&#10;&#13;&#10;  cp -r &quot;$original&quot; &quot;$VST&quot;&#13;&#10;  sed -i &quot;&quot; -e 's/TDMwPTul/BNDLPTul/g' &quot;$VST/Contents/PkgInfo&quot;&#13;&#10;  sed -i &quot;&quot; -e 's/TDMw/BNDL/g' &quot;$VST/Contents/$INFOPLIST_FILE&quot;&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyVST3 -gt 0 ]; then&#13;&#10;  echo &quot;Copying to VST3 folder...&quot;&#13;&#10;  VST3Dir=~/Library/Audio/Plug-Ins/VST3&#13;&#10;  mkdir -p &quot;$VST3Dir&quot;&#13;&#10;  VST3=$VST3Dir/$PRODUCT_NAME.vst3&#13;&#10;  if [ -d &quot;$VST3&quot; ]; then &#13;&#10;    rm -r &quot;$VST3&quot;&#13;&#10;  fi&#13;&#10;&#13;&#10;  cp -r &quot;$original&quot; &quot;$VST3&quot;&#13;&#10;  sed -i &quot;&quot; -e 's/TDMwPTul/BNDLPTul/g' &quot;$VST3/Contents/PkgInfo&quot;&#13;&#10;  sed -i &quot;&quot; -e 's/TDMw/BNDL/g' &quot;$VST3/Contents/$INFOPLIST_FILE&quot;&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyRTAS -gt 0 ]; then&#13;&#10;  echo &quot;Copying to RTAS folder...&quot;&#13;&#10;  RTASDir=/Library/Application\ Support/Digidesign/Plug-Ins&#13;&#10;  if [ -d &quot;$RTASDir&quot; ]; then&#13;&#10;    RTAS=$RTASDir/$PRODUCT_NAME.dpm&#13;&#10;    if [ -d &quot;$RTAS&quot; ]; then&#13;&#10;      rm -r &quot;$RTAS&quot;&#13;&#10;    fi&#13;&#10;&#13;&#10;    cp -r &quot;$original&quot; &quot;$RTAS&quot;&#13;&#10;  fi&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyAAX -gt 0 ]; then&#13;&#10;  echo &quot;Copying to AAX folder...&quot;&#13;&#10;&#13;&#10;  if [ -d &quot;/Applications/ProTools_3PDev/Plug-Ins&quot; ]; then&#13;&#10;    AAX1=&quot;/Applications/ProTools_3PDev/Plug-Ins/$PRODUCT_NAME.aaxplugin&quot;&#13;&#10;&#13;&#10;    if [ -d &quot;$AAX1&quot; ]; then&#13;&#10;      rm -r &quot;$AAX1&quot;&#13;&#10;    fi&#13;&#10;&#13;&#10;    cp -R -H &quot;$original&quot; &quot;$AAX1&quot;&#13;&#10;  fi&#13;&#10;&#13;&#10;  if [ -d &quot;/Library/Application Support/Avid/Audio/Plug-Ins&quot; ]; then&#13;&#10;    AAX2=&quot;/Library/Application Support/Avid/Audio/Plug-Ins/$PRODUCT_NAME.aaxplugin&quot;&#13;&#10;&#13;&#10;    if [ -d &quot;$AAX2&quot; ]; then&#13;&#10;      rm -r &quot;$AAX2&quot;&#13;&#10;    fi&#13;&#10;&#13;&#10;    cp -R -H &quot;$original&quot; &quot;$AAX2&quot;&#13;&#10;  fi&#13;&#10;fi&#13;&#10;"
54
               vstFolder="~/SDKs/vstsdk2.4" extraCompilerFlags="-DUSE_JUCE">
55
      <CONFIGURATIONS>
56
        <CONFIGURATION name="Debug" osxSDK="default" osxCompatibility="default" osxArchitecture="default"
57
                       isDebug="1" optimisation="1" targetName="UdpIo"/>
58
        <CONFIGURATION name="Release" osxSDK="default" osxCompatibility="default" osxArchitecture="default"
59
                       isDebug="0" optimisation="3" targetName="UdpIo"/>
60
      </CONFIGURATIONS>
61
      <MODULEPATHS>
62
        <MODULEPATH id="juce_video" path="../../../../juce/modules"/>
63
        <MODULEPATH id="juce_opengl" path="../../../../juce/modules"/>
64
        <MODULEPATH id="juce_gui_extra" path="../../../../juce/modules"/>
65
        <MODULEPATH id="juce_gui_basics" path="../../../../juce/modules"/>
66
        <MODULEPATH id="juce_graphics" path="../../../../juce/modules"/>
67
        <MODULEPATH id="juce_events" path="../../../../juce/modules"/>
68
        <MODULEPATH id="juce_data_structures" path="../../../../juce/modules"/>
69
        <MODULEPATH id="juce_cryptography" path="../../../../juce/modules"/>
70
        <MODULEPATH id="juce_core" path="../../../../juce/modules"/>
71
        <MODULEPATH id="juce_audio_processors" path="../../../../juce/modules"/>
72
        <MODULEPATH id="juce_audio_plugin_client" path="../../../../juce/modules"/>
73
        <MODULEPATH id="juce_audio_basics" path="../../../../juce/modules"/>
74
      </MODULEPATHS>
75
    </XCODE_MAC>
72 76
  </EXPORTFORMATS>
73 77
  <MODULES>
74 78
    <MODULES id="juce_audio_basics" showAllCode="1" useLocalCopy="0"/>

Also available in: Unified diff