Difference between revisions of "Talk:Madsonic"

From SME Server
Jump to navigationJump to search
(Created page with "to play as jukebox on the server yum install java-1.7.0-openjdk-devel java-openjdk-devel -y vim audioDevList.java coder to paste import java.io.*; import javax.sound....")
 
Line 44: Line 44:
 
Now edit sound.properties in Java installation used to run SubSonic and add:
 
Now edit sound.properties in Java installation used to run SubSonic and add:
  
javax.sound.sampled.Clip=#Intel [plughw:0,0]
+
javax.sound.sampled.Clip=#Intel [plughw:0,0]
javax.sound.sampled.Port=#Port Intel [hw:0]
+
javax.sound.sampled.Port=#Port Intel [hw:0]
javax.sound.sampled.SourceDataLine=#Intel [plughw:0,0]
+
javax.sound.sampled.SourceDataLine=#Intel [plughw:0,0]
javax.sound.sampled.TargetDataLine=#Intel [plughw:0,0]
+
javax.sound.sampled.TargetDataLine=#Intel [plughw:0,0]
  
 
In my case, file was: /
 
In my case, file was: /

Revision as of 04:41, 11 February 2014

to play as jukebox on the server

yum install java-1.7.0-openjdk-devel java-openjdk-devel -y


vim audioDevList.java

coder to paste

import java.io.*;
import javax.sound.sampled.*; 

public class audioDevList{
public static void main(String args[]){

//Get and display a list of
// available mixers.

Mixer.Info[] mixerInfo =
AudioSystem.getMixerInfo();
System.out.println("Available mixers:");
for(int cnt = 0; cnt < mixerInfo.length;
cnt++){
System.out.println(mixerInfo[cnt].
getName());
}//end for loop
}
} 

then

javac audioDevList.java
java audioDevList


should return something like

# java audioDevList
Available mixers:
dmix:0 [default]
Intel [plughw:0,0]
Intel [plughw:0,1]
Port Intel [hw:0]

Now edit sound.properties in Java installation used to run SubSonic and add:

javax.sound.sampled.Clip=#Intel [plughw:0,0]
javax.sound.sampled.Port=#Port Intel [hw:0]
javax.sound.sampled.SourceDataLine=#Intel [plughw:0,0]
javax.sound.sampled.TargetDataLine=#Intel [plughw:0,0]

In my case, file was: /

vim /usr/lib/jvm/java-1.7.0/jre/lib/sound.properties
vim /usr/lib/jvm/java-1.6.0/jre/lib/sound.properties 

that works, but now ALL Java apps on my system output audio to that device - which defeats the purpose of having ONLY music played on that device, avoiding system sounds like incoming mail notifications blowing your ears out at 110 decibels....

Adding -Djavax.sound.sampled.SourceDataLine="#Audio [plughw:1,0]" to java command line does not work in any combination I could think of, with or without other lines I added to sound.properties file.

Does anyone know how to achieve this for SubSonic only, without using system-wide configuration file?


sources

http://forum.subsonic.org/forum/viewtopic.php?t=2038 http://gravyflex.wordpress.com/2013/10/18/supersonic-subsonic-jukebox-mode-config/