mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
less volume for effect sounds
This commit is contained in:
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");
|
||||
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
|
||||
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
|
||||
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));
|
||||
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) {
|
||||
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
|
||||
*/
|
||||
public void play() {
|
||||
public void play(float gain) {
|
||||
Clip clip;
|
||||
if ((clip = getClip()) == null) return;
|
||||
if (clip.isActive()) {
|
||||
Clip onetimeclip = getFreshClip();
|
||||
FloatControl gainControl = (FloatControl) onetimeclip.getControl(FloatControl.Type.MASTER_GAIN);
|
||||
gainControl.setValue(gain);
|
||||
onetimeclip.start();
|
||||
} else {
|
||||
FloatControl gainControl = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN);
|
||||
gainControl.setValue(gain);
|
||||
clip.setFramePosition(0);
|
||||
clip.start();
|
||||
}
|
||||
|
@ -179,9 +183,9 @@ public class Audio {
|
|||
public static void main(String[] args) {
|
||||
try {
|
||||
Soundclip.dhtin.playExperimental();Thread.sleep(100);
|
||||
Soundclip.dhtin.play();Thread.sleep(500);
|
||||
Soundclip.dhtin.play();Thread.sleep(500);
|
||||
Soundclip.dhtin.play();Thread.sleep(500);
|
||||
Soundclip.newdoc.play(-20.0f);Thread.sleep(500);
|
||||
Soundclip.newdoc.play(-20.0f);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);
|
||||
|
|
|
@ -2848,7 +2848,7 @@ public final class Switchboard extends serverSwitch {
|
|||
? EventChannel.LOCALINDEXING
|
||||
: EventChannel.REMOTEINDEXING);
|
||||
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
|
||||
for ( final Map.Entry<DigestURL, String> rssEntry : document.getRSS().entrySet() ) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user