Compare commits
2 commits
7fcd9113c3
...
25b896c41d
Author | SHA1 | Date | |
---|---|---|---|
25b896c41d | |||
d72c63b2e5 |
4 changed files with 16 additions and 5 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"bufio"
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
@ -182,6 +183,10 @@ func ParseAmixerContent(cardId string) ([]*CardControl, error) {
|
|||
}
|
||||
|
||||
err = cmd.Wait()
|
||||
|
||||
// Sort mixers by NumID
|
||||
sort.Sort(ByNumID(ret))
|
||||
|
||||
return ret, err
|
||||
}
|
||||
|
||||
|
@ -202,3 +207,9 @@ func (cc *CardControl) CsetAmixer(cardId string, values ...string) error {
|
|||
|
||||
return cmd.Wait()
|
||||
}
|
||||
|
||||
type ByNumID []*CardControl
|
||||
|
||||
func (a ByNumID) Len() int { return len(a) }
|
||||
func (a ByNumID) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
|
||||
func (a ByNumID) Less(i, j int) bool { return a[i].NumID < a[j].NumID }
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
{#if (showInactives && $inputsList.length === 0) || (!showInactives && $activeInputs.length === 0)}
|
||||
<li class="list-group-item py-3">
|
||||
<span class="text-muted">
|
||||
Aucune source active.
|
||||
No active source.
|
||||
</span>
|
||||
</li>
|
||||
{/if}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
{#if $activeSources.length === 0 && $activeInputs.length === 0}
|
||||
<div class="text-muted text-center mt-1 mb-1">
|
||||
Aucune source active pour l'instant.
|
||||
No active audio source currently.
|
||||
</div>
|
||||
{:else}
|
||||
<marquee>
|
||||
|
@ -38,7 +38,7 @@
|
|||
{#if source.currentTitle}
|
||||
<strong>{source.currentTitle}</strong> <span class="text-muted">@ {source.name}</span>
|
||||
{:else}
|
||||
{source.name} activée
|
||||
{source.name} enabled
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -55,7 +55,7 @@
|
|||
{/each}
|
||||
<span class="text-muted">@ {input.name}</span>
|
||||
{:else}
|
||||
{input.name} activée
|
||||
{input.name} enabled
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<i class="bi bi-speaker"></i>
|
||||
Sources
|
||||
Inputs
|
||||
</div>
|
||||
<button
|
||||
class="btn btn-sm"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue