less volume for effect sounds

pull/1/head
Michael Peter Christen 10 years ago
parent bc221a0f9c
commit 5082feb103

@ -323,7 +323,7 @@ public final class search {
); );
Network.log.info("INIT HASH SEARCH (query-" + abstracts + "): " + QueryParams.anonymizedQueryHashes(theQuery.getQueryGoal().getIncludeHashes()) + " - " + theQuery.itemsPerPage() + " links"); Network.log.info("INIT HASH SEARCH (query-" + abstracts + "): " + QueryParams.anonymizedQueryHashes(theQuery.getQueryGoal().getIncludeHashes()) + " - " + theQuery.itemsPerPage() + " links");
EventChannel.channels(EventChannel.REMOTESEARCH).addMessage(new RSSMessage("Remote Search Request from " + ((remoteSeed == null) ? "unknown" : remoteSeed.getName()), QueryParams.anonymizedQueryHashes(theQuery.getQueryGoal().getIncludeHashes()), "")); EventChannel.channels(EventChannel.REMOTESEARCH).addMessage(new RSSMessage("Remote Search Request from " + ((remoteSeed == null) ? "unknown" : remoteSeed.getName()), QueryParams.anonymizedQueryHashes(theQuery.getQueryGoal().getIncludeHashes()), ""));
if (sb.getConfigBool(SwitchboardConstants.DECORATION_AUDIO, false)) Audio.Soundclip.remotesearch.play(); if (sb.getConfigBool(SwitchboardConstants.DECORATION_AUDIO, false)) Audio.Soundclip.remotesearch.play(-10.0f);
// make event // make event
theSearch = SearchEventCache.getEvent(theQuery, sb.peers, sb.tables, null, abstracts.length() > 0, sb.loader, count, maxtime); theSearch = SearchEventCache.getEvent(theQuery, sb.peers, sb.tables, null, abstracts.length() > 0, sb.loader, count, maxtime);

@ -176,7 +176,7 @@ public final class transferURL {
// return rewrite properties // return rewrite properties
Network.log.info("Received " + received + " URLs from peer " + otherPeerName + " in " + (System.currentTimeMillis() - start) + " ms, blocked " + blocked + " URLs"); Network.log.info("Received " + received + " URLs from peer " + otherPeerName + " in " + (System.currentTimeMillis() - start) + " ms, blocked " + blocked + " URLs");
EventChannel.channels(EventChannel.DHTRECEIVE).addMessage(new RSSMessage("Received " + received + ", blocked " + blocked + " URLs from peer " + otherPeerName, "", otherPeer.hash)); EventChannel.channels(EventChannel.DHTRECEIVE).addMessage(new RSSMessage("Received " + received + ", blocked " + blocked + " URLs from peer " + otherPeerName, "", otherPeer.hash));
if (sb.getConfigBool(SwitchboardConstants.DECORATION_AUDIO, false)) Audio.Soundclip.dhtin.play(); if (sb.getConfigBool(SwitchboardConstants.DECORATION_AUDIO, false)) Audio.Soundclip.dhtin.play(-10.0f);
if (doublecheck > 0) { if (doublecheck > 0) {
Network.log.warn("Received " + doublecheck + "/" + urlc + " double URLs from peer " + otherPeerName); // double should not happen because we demanded only documents which we do not have yet Network.log.warn("Received " + doublecheck + "/" + urlc + " double URLs from peer " + otherPeerName); // double should not happen because we demanded only documents which we do not have yet

@ -126,13 +126,17 @@ public class Audio {
/** /**
* play a soundclip once * play a soundclip once
*/ */
public void play() { public void play(float gain) {
Clip clip; Clip clip;
if ((clip = getClip()) == null) return; if ((clip = getClip()) == null) return;
if (clip.isActive()) { if (clip.isActive()) {
Clip onetimeclip = getFreshClip(); Clip onetimeclip = getFreshClip();
FloatControl gainControl = (FloatControl) onetimeclip.getControl(FloatControl.Type.MASTER_GAIN);
gainControl.setValue(gain);
onetimeclip.start(); onetimeclip.start();
} else { } else {
FloatControl gainControl = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN);
gainControl.setValue(gain);
clip.setFramePosition(0); clip.setFramePosition(0);
clip.start(); clip.start();
} }
@ -179,9 +183,9 @@ public class Audio {
public static void main(String[] args) { public static void main(String[] args) {
try { try {
Soundclip.dhtin.playExperimental();Thread.sleep(100); Soundclip.dhtin.playExperimental();Thread.sleep(100);
Soundclip.dhtin.play();Thread.sleep(500); Soundclip.newdoc.play(-20.0f);Thread.sleep(500);
Soundclip.dhtin.play();Thread.sleep(500); Soundclip.newdoc.play(-20.0f);Thread.sleep(500);
Soundclip.dhtin.play();Thread.sleep(500); Soundclip.newdoc.play(-20.0f);Thread.sleep(500);
Soundclip.remotesearch.start(); Thread.sleep(1000); Soundclip.remotesearch.stop(); Thread.sleep(1000); Soundclip.remotesearch.start(); Thread.sleep(1000); Soundclip.remotesearch.stop(); Thread.sleep(1000);
Soundclip.remotesearch.start(); Thread.sleep(1000); Soundclip.remotesearch.stop(); Thread.sleep(1000); Soundclip.remotesearch.start(); Thread.sleep(1000); Soundclip.remotesearch.stop(); Thread.sleep(1000);
Soundclip.remotesearch.start(); Thread.sleep(1000); Soundclip.remotesearch.stop(); Thread.sleep(1000); Soundclip.remotesearch.start(); Thread.sleep(1000); Soundclip.remotesearch.stop(); Thread.sleep(1000);

@ -2848,7 +2848,7 @@ public final class Switchboard extends serverSwitch {
? EventChannel.LOCALINDEXING ? EventChannel.LOCALINDEXING
: EventChannel.REMOTEINDEXING); : EventChannel.REMOTEINDEXING);
feed.addMessage(new RSSMessage("Indexed web page", dc_title, queueEntry.url(), ASCII.String(queueEntry.url().hash()))); feed.addMessage(new RSSMessage("Indexed web page", dc_title, queueEntry.url(), ASCII.String(queueEntry.url().hash())));
if (this.getConfigBool(SwitchboardConstants.DECORATION_AUDIO, false)) Audio.Soundclip.newdoc.play(); if (this.getConfigBool(SwitchboardConstants.DECORATION_AUDIO, false)) Audio.Soundclip.newdoc.play(-20.0f);
// store rss feeds in document into rss table // store rss feeds in document into rss table
for ( final Map.Entry<DigestURL, String> rssEntry : document.getRSS().entrySet() ) { for ( final Map.Entry<DigestURL, String> rssEntry : document.getRSS().entrySet() ) {

Loading…
Cancel
Save