Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • aura/engine
  • hermannschwaerzler/engine
  • sumpfralle/aura-engine
3 results
Show changes
Showing
with 130 additions and 0 deletions
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import os
import sys
#!/bin/bash
pack_int(){ printf "%08X\n" $1 | sed 's/\([0-9A-F]\{2\}\)\([0-9A-F]\{2\}\)\([0-9A-F]\{2\}\)\([0-9A-F]\{2\}\)/\\\\\\x\4\\\\\\x\3\\\\\\x\2\\\\\\x\1/I' | xargs printf; }
pack_short(){ printf "%04X\n" $1 | sed 's/\([0-9A-F]\{2\}\)\([0-9A-F]\{2\}\)/\\\\\\x\2\\\\\\x\1/I' | xargs printf; }
duration=1800
if [[ $# -eq 1 ]]; then
duration=$1
fi
channels=2
bps=16
sample=44100
Subchunk1Size=18
Subchunk2Size=$(echo "$duration*$sample*$channels*$bps/8" | bc)
ChunkSize=$((20 + $Subchunk1Size + $Subchunk2Size))
echo -n RIFF
pack_int $ChunkSize
echo -n "WAVEfmt "
pack_int $Subchunk1Size
pack_short 1
pack_short $channels
pack_int $sample
pack_int $((bps/8 * channels * sample))
pack_short $((bps/8 * channels))
pack_short $bps
pack_short 0
echo -n data
pack_int $Subchunk2Size
dd if=/dev/zero bs=1 count=$Subchunk2Size 2>/dev/null
This diff is collapsed.
This diff is collapsed.
#
# Aura Engine (https://gitlab.servus.at/aura/engine)
#
# Copyright (C) 2017-2020 - The Aura Engine Team.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
if a0_in != "" then
# we can ignore the result, since it is stored in the list 'inputs'
set_input(a0_in, "linein_0")
end
if a1_in != "" then
ignore(set_input(a1_in, "linein_1"))
end
if a2_in != "" then
ignore(set_input(a2_in, "linein_2"))
end
if a3_in != "" then
ignore(set_input(a3_in, "linein_3"))
end
if a4_in != "" then
ignore(set_input(a4_in, "linein_4"))
# input_4 = ref output.dummy(blank())
# set_input(input_4, a4_in, "linein_4")
# inputs := list.append([!input_4], !inputs)
end
\ No newline at end of file
#
# Aura Engine (https://gitlab.servus.at/aura/engine)
#
# Copyright (C) 2017-2020 - The Aura Engine Team.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Pre-population of stream input sources, as Liquidsoap needs it to initialize this input.
# This is overwritten as soon as some other Stream is scheduled.
# http_starturl = "http://stream01.kapper.net:8001/live.mp3"
# http_starturl = "http://stream.fro.at/fro-128.ogg"
http_starturl = "http://trance.out.airtime.pro:8000/trance_a"
# http_starturl = "http://chill.out.airtime.pro:8000/chill_a"
# http_starturl = "http://212.89.182.114:8008/frf"
https_starturl = "https://securestream.o94.at/live.mp3"
# https_starturl = "https://live.helsinki.at:8088/live160.ogg"
# https_starturl = "https://stream.fro.at/fro-128.ogg"
input_http_0 = input.http(id="in_http_0", buffer=input_stream_buffer, max=60.0, timeout=60.0, autostart=false, http_starturl)
input_http_1 = input.http(id="in_http_1", buffer=input_stream_buffer, max=60.0, timeout=60.0, autostart=false, http_starturl)
input_https_0 = input.https(id="in_https_0", buffer=input_stream_buffer, max=60.0, timeout=60.0, autostart=false, https_starturl)
input_https_1 = input.https(id="in_https_1", buffer=input_stream_buffer, max=60.0, timeout=60.0, autostart=false, https_starturl)
# Route input stream to an dummy output to avoid buffer-overrun messages
# output.dummy(id="SPAM_HTTP_OUTPUT_0", fallible=true, input_http_0)
# output.dummy(id="SPAM_HTTP_OUTPUT_1", fallible=true, input_http_1)
# output.dummy(id="SPAM_HTTPS_OUTPUT_0", fallible=true, input_https_0)
# output.dummy(id="SPAM_HTTPS_OUTPUT_1", fallible=true, input_https_1)
# output.dummy(blank())
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.