Skip to content

Commit

Permalink
Add alsa support for toolame-dab
Browse files Browse the repository at this point in the history
  • Loading branch information
YoannQueret committed Feb 9, 2016
1 parent 83d9406 commit 512af5c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
19 changes: 12 additions & 7 deletions encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,18 @@ def run_encoder(self):
args += ' -s %s' % (self.config.output_dab_samplerate)
args += ' -V %s' % (self.config.source_url)
args += ' -b %s' % (self.config.output_dab_bitrate)

hosts = self.config.output_zmq_host.replace(' ','').split(',')
for host in hosts:
args += ' tcp://%s;' % (host)
# Remove the last fucking ;
args = args[:-1]
logger.warn('%s' % args)

if self.config.source_type == 'alsa':
args += ' -s %s' % (self.config.output_dab_samplerate)
args += ' -V alsa://plug%s' % (self.config.source_device)
args += ' -b %s' % (self.config.output_dab_bitrate)

hosts = self.config.output_zmq_host.replace(' ','').split(',')
for host in hosts:
args += ' tcp://%s;' % (host)
# Remove the last fucking ;
args = args[:-1]
logger.warn('%s' % args)


args = args.split()
Expand Down
8 changes: 4 additions & 4 deletions static/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ <h4>DAB+ encoding configuration</h4>
</div>
<label class="control-label col-sm-2" for="output_dabp_samplerate">Samplerate:</label>
<div class="col-sm-3">
<input type="text" class="form-control" id="output_dabp_samplerate" placeholder="Enter samplerate (ex: 48000)">
<input type="text" class="form-control" id="output_dabp_samplerate" placeholder="Enter samplerate (ex: 48000)" data-toggle="tooltip" data-placement="top" title="Samplerate (ex: 48000)">
</div>
</div>

Expand Down Expand Up @@ -207,7 +207,7 @@ <h4>DAB encoding configuration</h4>
</div>
<label class="control-label col-sm-2" for="output_dab_samplerate">Samplerate:</label>
<div class="col-sm-3">
<input type="text" class="form-control" id="output_dab_samplerate" placeholder="Enter samplerate (ex: 48000)">
<input type="text" class="form-control" id="output_dab_samplerate" placeholder="Enter samplerate (ex: 48)" data-toggle="tooltip" data-placement="top" title="Samplerate (ex: 48)">
</div>
</div>

Expand All @@ -218,14 +218,14 @@ <h4>ZMQ configuration</h4>
<div class="form-group">
<label class="control-label col-sm-2" for="output_zmq_host">Hosts:</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="output_zmq_host" placeholder="Enter multiplex hostname and port" data-toggle="tooltip" data-placement="top" title="You can enter multiple output destination (ip:port) with comma separated (ip1:port,ip2:port).">
<input type="text" class="form-control" id="output_zmq_host" placeholder="Enter multiplex hostname and port" data-toggle="tooltip" data-placement="top" title="For DAB+ only, you can enter multiple output destination (ip:port) with comma separated (ip1:port,ip2:port).">
</div>
</div>

<div class="form-group">
<label class="control-label col-sm-2" for="output_zmq_key">Key:</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="output_zmq_key" placeholder="Enter ZMQ key if needed">
<input type="text" class="form-control" id="output_zmq_key" placeholder="Enter ZMQ key if needed" data-toggle="tooltip" data-placement="top" title="For DAB+ only, enter ZMQ key if needed">
</div>
</div>

Expand Down

0 comments on commit 512af5c

Please sign in to comment.