Difference between revisions of "Talk:Madsonic"

From SME Server
Jump to navigationJump to search
Line 62: Line 62:
 
sources
 
sources
  
http://forum.subsonic.org/forum/viewtopic.php?t=2038
+
 
http://gravyflex.wordpress.com/2013/10/18/supersonic-subsonic-jukebox-mode-config/
+
# http://forum.subsonic.org/forum/viewtopic.php?t=2038
 +
# http://gravyflex.wordpress.com/2013/10/18/supersonic-subsonic-jukebox-mode-config/
 +
# http://forum.subsonic.org/forum/viewtopic.php?f=5&t=8374&start=45
 +
# http://mj2p.co.uk/a-raspberry-pi-subsonic-jukebox-using-java-8/
 +
# http://forum.subsonic.org/forum/viewtopic.php?t=2879%29
 +
# http://forum.subsonic.org/forum/viewtopic.php?f=2&t=9303

Revision as of 07:18, 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, files were: /

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


  1. http://forum.subsonic.org/forum/viewtopic.php?t=2038
  2. http://gravyflex.wordpress.com/2013/10/18/supersonic-subsonic-jukebox-mode-config/
  3. http://forum.subsonic.org/forum/viewtopic.php?f=5&t=8374&start=45
  4. http://mj2p.co.uk/a-raspberry-pi-subsonic-jukebox-using-java-8/
  5. http://forum.subsonic.org/forum/viewtopic.php?t=2879%29
  6. http://forum.subsonic.org/forum/viewtopic.php?f=2&t=9303