sonic-pi-net / sonic-pi

Code. Music. Live.
https://sonic-pi.net
Other
10.81k stars 922 forks source link

Mismatched sample rates causes boot failure. #2181

Closed npes-95 closed 4 years ago

npes-95 commented 4 years ago

I was trying to use Sonic Pi (macOS 10.14.6, 2012 MBP) with a BT speaker, but was unable to launch it due to a sample rate mismatch (in: 8kHz, out: 48kHz) - at least this is what I understood from the log:

Sonic Pi Boot Error Report
==================




System Information
----------------


* Sonic Pi version: 3.1.0
* OS: macOS 10.14




GUI Log
-------


**`/Users/npes-95/.sonic-pi/log/gui.log`**

[GUI] - Detecting port numbers...
[GUI] - GUI OSC listen port 4558
[GUI] -    port: 4558 [OK]
[GUI] - Server OSC listen port 4557
[GUI] -    port: 4557 [OK]
[GUI] - Server incoming OSC cues port 4559
[GUI] -    port: 4559 [OK]
[GUI] - Scsynth port 4556
[GUI] -    port: 4556 [OK]
[GUI] - Server OSC out port 4558
[GUI] - GUI OSC out port 4557
[GUI] - Scsynth send port 4556
[GUI] - Erlang router port 4560
[GUI] -    port: 4560 [OK]
[GUI] - OSC MIDI out port 4561
[GUI] -    port: 4561 [OK]
[GUI] - OSC MIDI in port 4562
[GUI] -    port: 4562 [OK]
[GUI] - Init script completed
[GUI] - using default editor colours
[GUI] - launching Sonic Pi Server:
[GUI] - starting UDP OSC Server on port 4558...
[GUI] - UDP OSC Server ready and listening
[GUI] - Ruby server pid registered: 9303
[GUI] - waiting for Sonic Pi Server to boot...
............................................................
[GUI] - Critical error! Could not boot Sonic Pi Server.
[GUI] - stopping UDP OSC Server...







Server Errors
-------------


**`/Users/npes-95/.sonic-pi/log/server-errors.log`**

libc++abi.dylib: terminating
/Applications/Sonic Pi.app/app/server/ruby/vendor/sys-proctable-1.1.3/lib/darwin/sys/proctable.rb:163: warning: constant ::Fixnum is deprecated







Server Output
-------------


**`/Users/npes-95/.sonic-pi/log/server-output.log`**

Sonic Pi server booting...
Using protocol: udp
Detecting port numbers...
Send port: 4558
Listen port: 4557
  - OK
Scsynth port: 4556
  - OK
Scsynth send port: 4556
  - OK
OSC cues port: 4559
  - OK
Erlang port: 4560
  - OK
OSC MIDI out port: 4561
  - OK
OSC MIDI in port: 4562
  - OK
Booting server...




Booting Sonic Pi
----------------


Boot - Booting on OS X
Boot - Checkout audio rates on OSX:
Boot - Input audio rate: 8000.0
Boot - Output audio rate: 48000.0
Boot - Audio input and output rates do not match.
Boot - Attempting to set the input rates to match output rate of 48000.0...
Boot - Starting the SuperCollider server...
Boot - /Applications/Sonic Pi.app/app/server/native/scsynth -u 4556 -a 1024 -m 131072 -D 0 -R 0 -l 1 -i 16 -o 16 -U /Applications/Sonic Pi.app/app/server/native/supercollider/plugins/ -b 4096 -B 127.0.0.1







Scsynth Output
--------------


**`/Users/npes-95/.sonic-pi/log/scsynth.log`**

# Starting SuperCollider 2019-12-30 14:16:41
Found 0 LADSPA plugins
Number of Devices: 6
   0 : "Bose Mini II SoundLink"
   1 : "Bose Mini II SoundLink"
   2 : "Built-in Microph"
   3 : "Built-in Output"
   4 : "Soundflower (2ch)"
   5 : "Soundflower (64ch)"


ERROR: Input sample rate is 8000, but output is 48000. Mismatched sample rates are not supported. To disable input, set the number of input channels to 0.
could not initialize audio.







Process Log
--------------


**`/Users/npes-95/.sonic-pi/log/processes.log`**





Clearing pids: []
No pids to clear :-)
Started [9303] [-] /Applications/Sonic Pi.app/Contents/MacOS/../../app/server/native/ruby/bin/ruby --enable-frozen-string-literal -E utf-8 /Applications/Sonic Pi.app/Contents/MacOS/../../app/server/ruby/bin/sonic-pi-server.rb -u 4557 4558 4556 4556 4559 4560 4561 4562 [-] /var/folders/xz/tc9gy0vn5v5b1qp5rv36vcqr0000gn/T/sonic-pi-pids/9303



The proposed way to resolve the issue (in the error message) won't work as we can't boot and access the settings. Let me know what you think of this and I can provide additional details as necessary.

ethancrawford commented 4 years ago

Hi @npes-95. The above is a known issue, as described in #1856, (See Sam's comments there) which will be fixed as of the next release (or you can compile master branch yourself to get the fix for that now).

npes-95 commented 4 years ago

Hi @ethancrawford, thanks for getting back to me! I hadn't seen the issue, my bad :)