- if(c->speaker_backend == BACKEND_COMMAND && !c->speaker_command)
- fatal(0, "speaker_backend is command but speaker_command is not set");
- if(c->speaker_backend == BACKEND_NETWORK && !c->broadcast.n)
- fatal(0, "speaker_backend is network but broadcast is not set");
+ if(server) {
+ if(c->speaker_backend == BACKEND_COMMAND && !c->speaker_command)
+ fatal(0, "speaker_backend is command but speaker_command is not set");
+ if(c->speaker_backend == BACKEND_NETWORK && !c->broadcast.n)
+ fatal(0, "speaker_backend is network but broadcast is not set");
+ }
+ /* Override sample format */
+ switch(c->speaker_backend) {
+ case BACKEND_NETWORK:
+ c->sample_format.rate = 44100;
+ c->sample_format.channels = 2;
+ c->sample_format.bits = 16;
+ c->sample_format.endian = ENDIAN_BIG;
+ break;
+ case BACKEND_COREAUDIO:
+ c->sample_format.rate = 44100;
+ c->sample_format.channels = 2;
+ c->sample_format.bits = 16;
+ c->sample_format.endian = ENDIAN_NATIVE;
+ break;
+ }