Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SC_PortAudioDriver: exception in real time: alloc failed, increase server's memory allocation (e.g. via ServerOptions) #255

Open
low-bin opened this issue Dec 21, 2021 · 1 comment

Comments

@low-bin
Copy link

low-bin commented Dec 21, 2021

Greetings, I use windows 10 installed. I have a problem with SuperDirt. I've increased the memory allocation to 512, I've already put Jack to run with ASIO driver. How can this memory error occur if I use an external M-Audio Fast Track Ultra audio card? It worked 2 times by luck, but it always gives this error. But I didn't discover the source of the error and it always repeats itself. I even tried to run on an Ubuntu Studio that I have in parallel installed on the machine, but it shows the same error. I'm even thinking it's my laptop, i7 16gb ACER. Please help me out, I'm really excited to study Tidal more, I loved it when it worked, but these successive errors are really annoying.

My config
(
s.reboot { // server options are only updated on reboot
// configure the sound server: here you could add hardware specific options

s.latency = 0.24;

s.options
.numAudioBusChannels_(128 * 16) // for proxy usage: lots of ar bus space 1024
.memSize_(8192 * 512) // 512 MB This memory is used to allocate synths! 64 increase this if you get "alloc failed" messages
.maxNodes_(1024 * 32) // lots of synth nodes 16 increase this if you are getting drop outs and the message "too many nodes"
.maxSynthDefs_(1024 *2)
.numWireBufs_(64 * 32) // fat synthdefs need lots of interconnects
.numOutputBusChannels_(2)
.numBuffers_(1024 * 32) // increase this if you need to load more samples
o.device = "ASIO : M-Audio Fast Track Ultra ASIO"; // device name
.numInputBusChannels_(2)
.numOutputBusChannels_(2); // set this to your hardware output channel size, if necessary

// boot the server and start SuperDirt
s.waitForBoot {
	~dirt.stop; // stop any old ones, avoid duplicate dirt (if it is nil, this won't do anything)
	~dirt = SuperDirt(2, s); // two output channels, increase if you want to pan across more channels
	~dirt.loadSoundFiles;   // load samples (path containing a wildcard can be passed in)
	// for example: ~dirt.loadSoundFiles("/Users/myUserName/Dirt/samples/*");
	// s.sync; // optionally: wait for samples to be read
	~dirt = SuperDirt(2, s);
~dirt.start(57120, 0 ! 4);   // start listening on port 57120, create two busses each sending audio to channel 0

	// optional, needed for convenient access from sclang:
	(
		~d1 = ~dirt.orbits[0]; ~d2 = ~dirt.orbits[1]; ~d3 = ~dirt.orbits[2];
		~d4 = ~dirt.orbits[3];
	);
};

s.latency = 0.3; // increase this if you get "late" messages

};
);

@adcxyz
Copy link

adcxyz commented Dec 22, 2021

Hi,
it seems you are setting the memSize too high for scsynth to start:
8912 * 512 // = 4194304 kB, or 4 GB
AFAIK, the maximum size is 2 GB, and with higher memSize valuem scsynth fails.
tests:

s.quit;
s.options.memSize_(1024 * 1024); // set memSize to 1GB
s.boot; // boot/reboot work here

s.options.memSize_(2 * 1024 * 1024); // 2GB:
s.reboot; // reboot still works

s.options.memSize_( * 1024 * 1024); // 4GB:
s.reboot; // 4GB is too large,

// -> reboot fails with this error:
Server 'localhost' exited with exit code 0.
Booting server 'localhost' on address 127.0.0.1:57110.
Exception in World_New: alloc failed, increase server's memory allocation (e.g. via ServerOptions)
Server 'localhost' exited with exit code 0.

hope this helps,
adcxyz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants