Compare commits
66 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
187eeecd14 | ||
|
|
ddc93b66b4 | ||
|
|
32495631b1 | ||
|
|
837033a108 | ||
|
|
65a201fed6 | ||
|
|
52e6481047 | ||
|
|
337768effa | ||
|
|
037ae73ab3 | ||
|
|
dcf1b94682 | ||
|
|
4522439faf | ||
|
|
6d2d500456 | ||
|
|
5eaadd15bd | ||
|
|
90c2aa2639 | ||
|
|
2420b2a6df | ||
|
|
cd9ee08dcb | ||
|
|
3bd780896e | ||
|
|
a2a0167ed9 | ||
|
|
48128777e0 | ||
|
|
9cb754084b | ||
|
|
6549725ec5 | ||
|
|
787857d61a | ||
|
|
97092591e0 | ||
|
|
54b5913cd5 | ||
|
|
cb85b257b4 | ||
|
|
aa2dc9b432 | ||
|
|
d349d20c12 | ||
|
|
f2985c9f33 | ||
|
|
4bfaf097e0 | ||
|
|
8c8d6941f2 | ||
|
|
5b9c2cb399 | ||
|
|
78e579b3e3 | ||
|
|
3e4fd7dffb | ||
|
|
c0e69055fa | ||
|
|
82979c32e4 | ||
|
|
534e7fac80 | ||
|
|
9ed2ebaaa7 | ||
|
|
dc733d6b08 | ||
|
|
88bd30b732 | ||
|
|
fb043847de | ||
|
|
213b28a5aa | ||
|
|
a21dda3d86 | ||
|
|
0a9ad5c1e1 | ||
|
|
50e9ac4e81 | ||
|
|
235d9c5e83 | ||
|
|
a861bdabf0 | ||
|
|
66e74b6878 | ||
|
|
a18c344525 | ||
|
|
c92440aad8 | ||
|
|
882d4b1048 | ||
|
|
39a388e01b | ||
|
|
46eb8fb609 | ||
|
|
ecf4884564 | ||
|
|
962a07911c | ||
|
|
fc8858cae3 | ||
|
|
089e69d880 | ||
|
|
38f7504af2 | ||
|
|
2639ca055e | ||
|
|
3f45efedad | ||
|
|
f0ffe1b732 | ||
|
|
e926822747 | ||
|
|
b01cf309bd | ||
|
|
70118f5f93 | ||
|
|
44f3750171 | ||
|
|
ed9c1b7b4e | ||
|
|
8a241fa7db | ||
|
|
471ba9b3cf |
142
.github/workflows/build.yml
vendored
Normal file
|
|
@ -0,0 +1,142 @@
|
||||||
|
name: Build alsa-tools
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
fedora_latest_build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: fedora:latest
|
||||||
|
env:
|
||||||
|
QTDIR: /usr/lib64/qt-3.3
|
||||||
|
steps:
|
||||||
|
- name: Prepare environment
|
||||||
|
run: |
|
||||||
|
dnf -y upgrade
|
||||||
|
dnf -y install @development-tools gcc-c++ libtool bzip2 gtk2-devel gtk3-devel fltk-devel qt3-devel
|
||||||
|
|
||||||
|
- name: Checkout alsa-lib
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: alsa-project/alsa-lib
|
||||||
|
ref: master
|
||||||
|
path: alsa-lib
|
||||||
|
- name: Configure alsa-lib
|
||||||
|
run: |
|
||||||
|
cd alsa-lib
|
||||||
|
head -5 configure.ac
|
||||||
|
libtoolize --force --copy --automake
|
||||||
|
aclocal
|
||||||
|
autoheader
|
||||||
|
automake --foreign --copy --add-missing
|
||||||
|
autoconf
|
||||||
|
export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g"
|
||||||
|
./configure
|
||||||
|
echo "Version: $(cat version)"
|
||||||
|
- name: Build alsa-lib
|
||||||
|
run: |
|
||||||
|
cd alsa-lib
|
||||||
|
make
|
||||||
|
- name: Install alsa-lib
|
||||||
|
run: |
|
||||||
|
cd alsa-lib
|
||||||
|
make install
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: alsa-tools
|
||||||
|
- name: Checkout all tags
|
||||||
|
run: |
|
||||||
|
cd alsa-tools
|
||||||
|
git fetch --prune --tags --force
|
||||||
|
git fetch --prune --unshallow --force
|
||||||
|
- name: Modify version
|
||||||
|
run: |
|
||||||
|
cd alsa-tools
|
||||||
|
mv Makefile Makefile.old
|
||||||
|
version=$(git describe | sed -e 's/v//')
|
||||||
|
if test -z "$version"; then version=$(git describe --tags | sed -e 's/v//'); fi
|
||||||
|
if test -z "$version"; then version1=$(grep "VERSION = .*" Makefile.old | cut -d ' ' -f 3); version2=$(git rev-parse --short HEAD); version="${version1}-g${version2}"; fi
|
||||||
|
echo "Version: ${version}"
|
||||||
|
sed -r "s/VERSION = .*/VERSION = ${version}/" < Makefile.old > Makefile
|
||||||
|
grep "VERSION =" Makefile
|
||||||
|
- name: Compile and install as10k1 (dependency)
|
||||||
|
run: |
|
||||||
|
cd alsa-tools/as10k1
|
||||||
|
./gitcompile --prefix=/usr
|
||||||
|
make install
|
||||||
|
- name: Compile and install ld10k1 (dependency)
|
||||||
|
run: |
|
||||||
|
cd alsa-tools/ld10k1
|
||||||
|
./gitcompile --prefix=/usr
|
||||||
|
make install
|
||||||
|
- name: Configure and build
|
||||||
|
run: |
|
||||||
|
cd alsa-tools
|
||||||
|
./gitcompile
|
||||||
|
- name: Create package
|
||||||
|
run: |
|
||||||
|
cd alsa-tools
|
||||||
|
make alsa-dist
|
||||||
|
mkdir ../artifacts
|
||||||
|
mv alsa-tools*.tar.bz2 ../artifacts
|
||||||
|
- name: Archive package
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: alsa-tools-test-package
|
||||||
|
path: artifacts/
|
||||||
|
|
||||||
|
ubuntu_last_build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ubuntu:latest
|
||||||
|
steps:
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
apt-get update
|
||||||
|
apt-get -y install apt-utils
|
||||||
|
apt-get -y full-upgrade
|
||||||
|
apt-get install -y git build-essential pkg-config m4 autoconf automake libtool ibgtk2.0-dev libgtk-3-dev libfltk1.3-dev
|
||||||
|
|
||||||
|
- name: Checkout alsa-lib
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: alsa-project/alsa-lib
|
||||||
|
ref: master
|
||||||
|
- name: Configure alsa-lib
|
||||||
|
run: |
|
||||||
|
libtoolize --force --copy --automake
|
||||||
|
aclocal
|
||||||
|
autoheader
|
||||||
|
automake --foreign --copy --add-missing
|
||||||
|
autoconf
|
||||||
|
export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g"
|
||||||
|
./configure
|
||||||
|
- name: Build alsa-lib
|
||||||
|
run: |
|
||||||
|
make
|
||||||
|
- name: Install alsa-lib
|
||||||
|
run: |
|
||||||
|
make install
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Remove qlo10k1
|
||||||
|
run: |
|
||||||
|
mv Makefile Makefile.old
|
||||||
|
sed -e 's/qlo10k1//' < Makefile.old > Makefile
|
||||||
|
- name: Compile and install as10k1 (dependency)
|
||||||
|
run: |
|
||||||
|
cd as10k1
|
||||||
|
./gitcompile --prefix=/usr
|
||||||
|
make install
|
||||||
|
- name: Compile and install ld10k1 (dependency)
|
||||||
|
run: |
|
||||||
|
cd ld10k1
|
||||||
|
./gitcompile --prefix=/usr
|
||||||
|
make install
|
||||||
|
- name: Configure and build
|
||||||
|
run: |
|
||||||
|
./gitcompile
|
||||||
11
.gitignore
vendored
|
|
@ -30,6 +30,7 @@ autom4te.cache
|
||||||
stamp-h1
|
stamp-h1
|
||||||
version
|
version
|
||||||
distdir
|
distdir
|
||||||
|
*/compile
|
||||||
|
|
||||||
ac3dec/Makefile
|
ac3dec/Makefile
|
||||||
ac3dec/ac3dec
|
ac3dec/ac3dec
|
||||||
|
|
@ -45,24 +46,28 @@ as10k1/configure
|
||||||
echomixer/echomixer
|
echomixer/echomixer
|
||||||
echomixer/Makefile
|
echomixer/Makefile
|
||||||
echomixer/configure
|
echomixer/configure
|
||||||
|
echomixer/desktop/Makefile
|
||||||
envy24control/Makefile
|
envy24control/Makefile
|
||||||
envy24control/configure
|
envy24control/configure
|
||||||
|
envy24control/desktop/Makefile
|
||||||
hdspconf/Makefile
|
hdspconf/Makefile
|
||||||
hdspconf/configure
|
hdspconf/configure
|
||||||
hdspconf/src/hdspconf
|
hdspconf/src/hdspconf
|
||||||
hdspconf/src/Makefile
|
hdspconf/src/Makefile
|
||||||
hdspconf/pixmaps/Makefile
|
hdspconf/pixmaps/Makefile
|
||||||
|
hdspconf/desktop/Makefile
|
||||||
hdspmixer/Makefile
|
hdspmixer/Makefile
|
||||||
hdspmixer/configure
|
hdspmixer/configure
|
||||||
hdspmixer/src/hdspmixer
|
hdspmixer/src/hdspmixer
|
||||||
hdspmixer/pixmaps/Makefile
|
hdspmixer/pixmaps/Makefile
|
||||||
|
hdspmixer/desktop/Makefile
|
||||||
hdspmixer/src/Makefile
|
hdspmixer/src/Makefile
|
||||||
hdsploader/Makefile
|
hdsploader/Makefile
|
||||||
hdsploader/configure
|
hdsploader/configure
|
||||||
hwmixvolume/Makefile
|
hwmixvolume/Makefile
|
||||||
hwmixvolume/configure
|
hwmixvolume/configure
|
||||||
|
hwmixvolume/desktop/Makefile
|
||||||
ld10k1/Makefile
|
ld10k1/Makefile
|
||||||
ld10k1/compile
|
|
||||||
ld10k1/ld10k1d
|
ld10k1/ld10k1d
|
||||||
ld10k1/configure
|
ld10k1/configure
|
||||||
ld10k1/m4/
|
ld10k1/m4/
|
||||||
|
|
@ -123,6 +128,10 @@ hdajackretask/configure
|
||||||
hdajackretask/Makefile
|
hdajackretask/Makefile
|
||||||
hdajackretask/README.generated.h
|
hdajackretask/README.generated.h
|
||||||
hdajackretask/hdajackretask
|
hdajackretask/hdajackretask
|
||||||
|
hdajackretask/desktop/Makefile
|
||||||
|
hdajacksensetest/Makefile
|
||||||
|
hdajacksensetest/configure
|
||||||
|
hdajacksensetest/hdajacksensetest
|
||||||
hda-verb/Makefile
|
hda-verb/Makefile
|
||||||
hda-verb/configure
|
hda-verb/configure
|
||||||
hda-verb/hda-verb
|
hda-verb/hda-verb
|
||||||
|
|
|
||||||
4
Makefile
|
|
@ -1,4 +1,4 @@
|
||||||
VERSION = 1.0.29
|
VERSION = 1.2.14
|
||||||
TOP = .
|
TOP = .
|
||||||
SUBDIRS = as10k1 envy24control hdsploader hdspconf hdspmixer \
|
SUBDIRS = as10k1 envy24control hdsploader hdspconf hdspmixer \
|
||||||
mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \
|
mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \
|
||||||
|
|
@ -29,7 +29,7 @@ install:
|
||||||
done
|
done
|
||||||
|
|
||||||
alsa-dist:
|
alsa-dist:
|
||||||
@echo $(VERSION) >> $(TOP)/version
|
@echo $(VERSION) > $(TOP)/version
|
||||||
@mkdir -p $(TOP)/distdir
|
@mkdir -p $(TOP)/distdir
|
||||||
@for i in $(SUBDIRS); do \
|
@for i in $(SUBDIRS); do \
|
||||||
cd $(TOP)/$$i; echo $(TOP)/$$i; \
|
cd $(TOP)/$$i; echo $(TOP)/$$i; \
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
|
||||||
|
|
@ -244,6 +244,7 @@ void asm_open(char *name)
|
||||||
struct stat st;
|
struct stat st;
|
||||||
char *next;
|
char *next;
|
||||||
int backup_line_num,backup_file_num;
|
int backup_line_num,backup_file_num;
|
||||||
|
size_t rsize;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -284,8 +285,10 @@ void asm_open(char *name)
|
||||||
|
|
||||||
buff[i].mem_end = buff[i].mem_start+st.st_size;
|
buff[i].mem_end = buff[i].mem_start+st.st_size;
|
||||||
|
|
||||||
read(fd, buff[i].mem_start, st.st_size);
|
rsize = read(fd, buff[i].mem_start, st.st_size);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
if (rsize != st.st_size)
|
||||||
|
as_exit("short read from input file\n");
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("File %s opened:\n",name);
|
printf("File %s opened:\n",name);
|
||||||
|
|
@ -366,8 +369,8 @@ void as_exit(const char *message)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void output_tram_line( struct list_head *line_head, int type){
|
void output_tram_line(struct list_head *line_head, int type)
|
||||||
|
{
|
||||||
struct tram *tram_sym;
|
struct tram *tram_sym;
|
||||||
struct list_head *entry;
|
struct list_head *entry;
|
||||||
|
|
||||||
|
|
@ -383,13 +386,14 @@ inline void output_tram_line( struct list_head *line_head, int type){
|
||||||
val = __cpu_to_le32(tram_sym->data.value);
|
val = __cpu_to_le32(tram_sym->data.value);
|
||||||
fwrite(&val,sizeof(u32),1,fp);
|
fwrite(&val,sizeof(u32),1,fp);
|
||||||
if(listing){
|
if(listing){
|
||||||
if(type==TYPE_TRAM_ADDR_READ)
|
if(type==TYPE_TRAM_ADDR_READ) {
|
||||||
fprintf(listfile,"\tRead");
|
fprintf(listfile,"\tRead");
|
||||||
else
|
} else {
|
||||||
fprintf(listfile,"\tWrite");
|
fprintf(listfile,"\tWrite");
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(listfile,": 0x3%02x/0x2%02x (%s), offset 0x%07x\n",tram_sym->data.address,tram_sym->data.address,
|
fprintf(listfile,": 0x3%02x/0x2%02x (%s), offset 0x%07x\n",tram_sym->data.address,tram_sym->data.address,
|
||||||
(prev_sym((&tram_sym->list)))->data.name,tram_sym->data.value);
|
(prev_sym((&tram_sym->list)))->data.name,tram_sym->data.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,6 @@ int tram_table_count=0;
|
||||||
int gpr_constant_count=0;
|
int gpr_constant_count=0;
|
||||||
|
|
||||||
char patch_name[PATCH_NAME_SIZE]="NO_NAME";
|
char patch_name[PATCH_NAME_SIZE]="NO_NAME";
|
||||||
int macro_depth=0;
|
unsigned int macro_depth=0;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include"types.h"
|
#include"types.h"
|
||||||
#include"proto.h"
|
#include"proto.h"
|
||||||
|
#include"parse.h"
|
||||||
|
|
||||||
extern int dbg_opt;
|
extern int dbg_opt;
|
||||||
extern FILE *listfile;
|
extern FILE *listfile;
|
||||||
|
|
@ -45,7 +46,6 @@ void op(int op, int z,int w,int x,int y)
|
||||||
int w0, w1;
|
int w0, w1;
|
||||||
extern int dsp_code[DSP_CODE_SIZE];
|
extern int dsp_code[DSP_CODE_SIZE];
|
||||||
extern int ip;
|
extern int ip;
|
||||||
extern char op_codes[35][9];
|
|
||||||
extern char listtemp[60];
|
extern char listtemp[60];
|
||||||
if (ip >= 0x200)
|
if (ip >= 0x200)
|
||||||
as_exit("to many instructions");
|
as_exit("to many instructions");
|
||||||
|
|
@ -306,7 +306,6 @@ void add_symbol(char *name, u16 type, u16 address, u32 value)
|
||||||
|
|
||||||
extern int gpr_input_count,gpr_output_count,gpr_static_count,gpr_dynamic_count,gpr_control_count,gpr_constant_count;
|
extern int gpr_input_count,gpr_output_count,gpr_static_count,gpr_dynamic_count,gpr_control_count,gpr_constant_count;
|
||||||
struct sym *sym;
|
struct sym *sym;
|
||||||
struct tram *tmp_ptr;
|
|
||||||
extern struct list_head sym_head;
|
extern struct list_head sym_head;
|
||||||
extern struct delay tram_delay[MAX_TANK_ADDR];
|
extern struct delay tram_delay[MAX_TANK_ADDR];
|
||||||
extern struct lookup tram_lookup[MAX_TANK_ADDR];
|
extern struct lookup tram_lookup[MAX_TANK_ADDR];
|
||||||
|
|
@ -356,10 +355,8 @@ void add_symbol(char *name, u16 type, u16 address, u32 value)
|
||||||
else
|
else
|
||||||
tram_delay[tmp].write++;
|
tram_delay[tmp].write++;
|
||||||
}else{
|
}else{
|
||||||
tmp_ptr=(struct tram *)sym;
|
|
||||||
list_add_tail(&(((struct tram *)sym)->tram) , &(tram_lookup[tmp].tram) );
|
list_add_tail(&(((struct tram *)sym)->tram) , &(tram_lookup[tmp].tram) );
|
||||||
tmp_ptr=(struct tram *)sym;
|
if(type== TYPE_TRAM_ADDR_READ)
|
||||||
if(type== TYPE_TRAM_ADDR_READ)
|
|
||||||
tram_lookup[tmp].read++;
|
tram_lookup[tmp].read++;
|
||||||
else
|
else
|
||||||
tram_lookup[tmp].write++;
|
tram_lookup[tmp].write++;
|
||||||
|
|
|
||||||
|
|
@ -72,14 +72,11 @@ void new_macro(char *symbol, char *line, char *operand)
|
||||||
void macro_expand(int macnum,char *operand )
|
void macro_expand(int macnum,char *operand )
|
||||||
{
|
{
|
||||||
char *line,*next;
|
char *line,*next;
|
||||||
int done=0,i,old;
|
int done=0,old;
|
||||||
extern unsigned int macro_depth;
|
extern unsigned int macro_depth;
|
||||||
extern int macro_line_num;
|
extern int macro_line_num;
|
||||||
char string[MAX_LINE_LENGTH];
|
char string[MAX_LINE_LENGTH];
|
||||||
|
|
||||||
//initialize macro use:
|
|
||||||
i=0;
|
|
||||||
|
|
||||||
if(macro_depth+1> MAX_MAC_DEPTH)
|
if(macro_depth+1> MAX_MAC_DEPTH)
|
||||||
as_exit("Error exceeded maximum number of recursive macro calls");
|
as_exit("Error exceeded maximum number of recursive macro calls");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
#include<string.h>
|
#include<string.h>
|
||||||
#include<stdio.h>
|
#include<stdio.h>
|
||||||
#include"types.h"
|
#include"types.h"
|
||||||
|
#define DECLARE_OP_CODES
|
||||||
#include"parse.h"
|
#include"parse.h"
|
||||||
#include"proto.h"
|
#include"proto.h"
|
||||||
|
|
||||||
|
|
@ -87,7 +88,7 @@ int parse( char line_string[MAX_LINE_LENGTH], char *line)
|
||||||
if((tmp=ismacro(op_name_ptr)) != -1 ){
|
if((tmp=ismacro(op_name_ptr)) != -1 ){
|
||||||
if(defmacro==0)
|
if(defmacro==0)
|
||||||
macro_expand(tmp,strtok(NULL,""));
|
macro_expand(tmp,strtok(NULL,""));
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( (op_num=op_decode(op_name_ptr))==-1) {
|
if( (op_num=op_decode(op_name_ptr))==-1) {
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,9 @@ enum foo {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef DECLARE_OP_CODES
|
||||||
|
extern char op_codes[NUM_OPS+1][9];
|
||||||
|
#else
|
||||||
char op_codes[NUM_OPS+1][9]=
|
char op_codes[NUM_OPS+1][9]=
|
||||||
{
|
{
|
||||||
"MACS",
|
"MACS",
|
||||||
|
|
@ -110,6 +112,7 @@ char op_codes[NUM_OPS+1][9]=
|
||||||
"con",
|
"con",
|
||||||
"NotAnOp"
|
"NotAnOp"
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
//extern int file_num,source_line_num
|
//extern int file_num,source_line_num
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
SUBDIRS = desktop
|
||||||
AM_CFLAGS = @ECHOMIXER_CFLAGS@
|
AM_CFLAGS = @ECHOMIXER_CFLAGS@
|
||||||
bin_PROGRAMS = echomixer
|
bin_PROGRAMS = echomixer
|
||||||
man_MANS =
|
man_MANS =
|
||||||
|
|
|
||||||
|
|
@ -7,4 +7,4 @@ AM_MAINTAINER_MODE([enable])
|
||||||
|
|
||||||
PKG_CHECK_MODULES(ECHOMIXER, gtk+-2.0 alsa >= 1.0.0)
|
PKG_CHECK_MODULES(ECHOMIXER, gtk+-2.0 alsa >= 1.0.0)
|
||||||
|
|
||||||
AC_OUTPUT(Makefile)
|
AC_OUTPUT(Makefile desktop/Makefile)
|
||||||
|
|
|
||||||
34
echomixer/desktop/Makefile.am
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
APPNAME = echomixer
|
||||||
|
|
||||||
|
desktopdir = $(datadir)/applications
|
||||||
|
desktop_DATA = $(APPNAME).desktop
|
||||||
|
|
||||||
|
public_icons = \
|
||||||
|
hicolor_apps_48x48_$(APPNAME).png
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
$(public_icons) \
|
||||||
|
$(desktop_DATA)
|
||||||
|
|
||||||
|
install-icons:
|
||||||
|
for icon in $(public_icons); do \
|
||||||
|
THEME=`echo $$icon | cut -d_ -f1`; \
|
||||||
|
CONTEXT=`echo $$icon | cut -d_ -f2`; \
|
||||||
|
SIZE=`echo $$icon | cut -d_ -f3`; \
|
||||||
|
ICONFILE=`echo $$icon | cut -d_ -f4`; \
|
||||||
|
mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
|
||||||
|
$(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-icons:
|
||||||
|
-for icon in $(public_icons); do \
|
||||||
|
THEME=`echo $$icon | cut -d_ -f1`; \
|
||||||
|
CONTEXT=`echo $$icon | cut -d_ -f2`; \
|
||||||
|
SIZE=`echo $$icon | cut -d_ -f3`; \
|
||||||
|
ICONFILE=`echo $$icon | cut -d_ -f4`; \
|
||||||
|
rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
|
||||||
|
done
|
||||||
|
|
||||||
|
install-data-local: install-icons
|
||||||
|
|
||||||
|
uninstall-local: uninstall-icons
|
||||||
10
echomixer/desktop/echomixer.desktop
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Echomixer
|
||||||
|
GenericName=Control Echo Digital Audio sound cards
|
||||||
|
Comment=Mixer and GUI control utility for Echo Digital Audio sound cards
|
||||||
|
Exec=echomixer
|
||||||
|
Icon=echomixer
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=AudioVideo;
|
||||||
|
Version=0.9.4
|
||||||
BIN
echomixer/desktop/hicolor_apps_48x48_echomixer.png
Normal file
|
After Width: | Height: | Size: 841 B |
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define EM_VERSION "%s Echomixer v" VERSION
|
#define EM_VERSION "%s Echomixer v" VERSION
|
||||||
|
|
@ -525,6 +525,25 @@ void GetChannels(void) {
|
||||||
nLOut=snd_ctl_elem_value_get_integer(control, 2); // Number of output channels
|
nLOut=snd_ctl_elem_value_get_integer(control, 2); // Number of output channels
|
||||||
fdOut=snd_ctl_elem_value_get_integer(control, 3); // First digital out
|
fdOut=snd_ctl_elem_value_get_integer(control, 3); // First digital out
|
||||||
nPOut=snd_ctl_elem_value_get_integer(control, 4); // Number of virtual output channels (==nLOut on non-vmixer cards)
|
nPOut=snd_ctl_elem_value_get_integer(control, 4); // Number of virtual output channels (==nLOut on non-vmixer cards)
|
||||||
|
|
||||||
|
mixerControl.outputs = nLOut;
|
||||||
|
mixerControl.inputs = nIn;
|
||||||
|
|
||||||
|
if (vmixerId) {
|
||||||
|
vmixerControl.outputs = nLOut;
|
||||||
|
vmixerControl.inputs = nPOut;
|
||||||
|
|
||||||
|
/* For outputs and inputs. */
|
||||||
|
metersStreams = 2;
|
||||||
|
} else {
|
||||||
|
/* For outputs, inputs and system outputs. */
|
||||||
|
metersStreams = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* For the number of channels. */
|
||||||
|
metersNumber = 16;
|
||||||
|
/* For each of levels and peaks. */
|
||||||
|
metersTypes = 2;
|
||||||
}
|
}
|
||||||
ClockMask=snd_ctl_elem_value_get_integer(control, 5); // Bitmask of available input clocks
|
ClockMask=snd_ctl_elem_value_get_integer(control, 5); // Bitmask of available input clocks
|
||||||
}
|
}
|
||||||
|
|
@ -610,9 +629,7 @@ gint DrawMixer(gpointer unused) {
|
||||||
int OutPeak[ECHO_MAXAUDIOOUTPUTS];
|
int OutPeak[ECHO_MAXAUDIOOUTPUTS];
|
||||||
int VirLevel[ECHO_MAXAUDIOOUTPUTS];
|
int VirLevel[ECHO_MAXAUDIOOUTPUTS];
|
||||||
int VirPeak[ECHO_MAXAUDIOOUTPUTS];
|
int VirPeak[ECHO_MAXAUDIOOUTPUTS];
|
||||||
static int InClip[ECHO_MAXAUDIOINPUTS];
|
char str[16];
|
||||||
static int OutClip[ECHO_MAXAUDIOOUTPUTS];
|
|
||||||
char str[8];
|
|
||||||
int i, o, dB;
|
int i, o, dB;
|
||||||
GdkColor Grid={0x787878, 0, 0, 0};
|
GdkColor Grid={0x787878, 0, 0, 0};
|
||||||
GdkColor Labels={0x9694C4, 0, 0, 0};
|
GdkColor Labels={0x9694C4, 0, 0, 0};
|
||||||
|
|
@ -628,13 +645,8 @@ gint DrawMixer(gpointer unused) {
|
||||||
update_rect.height = Mixheight;
|
update_rect.height = Mixheight;
|
||||||
GetVUmeters(InLevel, InPeak, OutLevel, OutPeak, VirLevel, VirPeak);
|
GetVUmeters(InLevel, InPeak, OutLevel, OutPeak, VirLevel, VirPeak);
|
||||||
|
|
||||||
if (!gc) {
|
if (!gc)
|
||||||
gc=gdk_gc_new(gtk_widget_get_parent_window(Mixdarea));
|
gc=gdk_gc_new(gtk_widget_get_parent_window(Mixdarea));
|
||||||
for (i=0; i<nIn; i++)
|
|
||||||
InClip[i]=0;
|
|
||||||
for (i=0; i<nLOut; i++)
|
|
||||||
OutClip[i]=0;
|
|
||||||
}
|
|
||||||
|
|
||||||
gdk_draw_rectangle(Mixpixmap, Mixdarea->style->black_gc, TRUE, 0, 0, Mixwidth, Mixheight);
|
gdk_draw_rectangle(Mixpixmap, Mixdarea->style->black_gc, TRUE, 0, 0, Mixwidth, Mixheight);
|
||||||
|
|
||||||
|
|
@ -1674,7 +1686,7 @@ void ToggleWindow(GtkWidget *widget, gpointer window) {
|
||||||
// Scan all controls and sets up the structures needed to access them.
|
// Scan all controls and sets up the structures needed to access them.
|
||||||
int OpenControls(const char *card, const char *cardname) {
|
int OpenControls(const char *card, const char *cardname) {
|
||||||
int err, i, o;
|
int err, i, o;
|
||||||
int numid, count, items, item;
|
int numid, items, item;
|
||||||
snd_hctl_t *handle;
|
snd_hctl_t *handle;
|
||||||
snd_hctl_elem_t *elem;
|
snd_hctl_elem_t *elem;
|
||||||
snd_ctl_elem_id_t *id;
|
snd_ctl_elem_id_t *id;
|
||||||
|
|
@ -1707,20 +1719,15 @@ int OpenControls(const char *card, const char *cardname) {
|
||||||
continue;
|
continue;
|
||||||
snd_hctl_elem_get_id(elem, id);
|
snd_hctl_elem_get_id(elem, id);
|
||||||
numid=snd_ctl_elem_id_get_numid(id);
|
numid=snd_ctl_elem_id_get_numid(id);
|
||||||
count=snd_ctl_elem_info_get_count(info);
|
|
||||||
if (!strcmp("Monitor Mixer Volume", snd_ctl_elem_id_get_name(id))) {
|
if (!strcmp("Monitor Mixer Volume", snd_ctl_elem_id_get_name(id))) {
|
||||||
if (!mixerId) {
|
if (!mixerId) {
|
||||||
mixerId=numid;
|
mixerId=numid;
|
||||||
CTLID_DEBUG(("First Mixer id=%d\n", mixerId));
|
CTLID_DEBUG(("First Mixer id=%d\n", mixerId));
|
||||||
mixerControl.outputs=snd_ctl_elem_info_get_dimension(info, 0);
|
|
||||||
mixerControl.inputs=snd_ctl_elem_info_get_dimension(info, 1);
|
|
||||||
}
|
}
|
||||||
} else if (!strcmp("VMixer Volume", snd_ctl_elem_id_get_name(id))) {
|
} else if (!strcmp("VMixer Volume", snd_ctl_elem_id_get_name(id))) {
|
||||||
if (!vmixerId) {
|
if (!vmixerId) {
|
||||||
vmixerId=vmixerControl.id=numid;
|
vmixerId=vmixerControl.id=numid;
|
||||||
CTLID_DEBUG(("First Vmixer id=%d\n", vmixerId));
|
CTLID_DEBUG(("First Vmixer id=%d\n", vmixerId));
|
||||||
vmixerControl.outputs=snd_ctl_elem_info_get_dimension(info, 0);
|
|
||||||
vmixerControl.inputs=snd_ctl_elem_info_get_dimension(info, 1);
|
|
||||||
}
|
}
|
||||||
} else if (!strcmp("PCM Playback Volume", snd_ctl_elem_id_get_name(id))) {
|
} else if (!strcmp("PCM Playback Volume", snd_ctl_elem_id_get_name(id))) {
|
||||||
pcmoutId=pcmoutControl.id=numid;
|
pcmoutId=pcmoutControl.id=numid;
|
||||||
|
|
@ -1789,9 +1796,6 @@ int OpenControls(const char *card, const char *cardname) {
|
||||||
CTLID_DEBUG(("VU-meter switch id=%d\n", numid));
|
CTLID_DEBUG(("VU-meter switch id=%d\n", numid));
|
||||||
} else if (!strcmp("VU-meters", snd_ctl_elem_id_get_name(id))) {
|
} else if (!strcmp("VU-meters", snd_ctl_elem_id_get_name(id))) {
|
||||||
vumetersId=numid;
|
vumetersId=numid;
|
||||||
metersStreams=snd_ctl_elem_info_get_dimension(info, 0); // 2 or 3: output, input and (vmixer cards only) pcm
|
|
||||||
metersNumber=snd_ctl_elem_info_get_dimension(info, 1); // Number of channels
|
|
||||||
metersTypes=snd_ctl_elem_info_get_dimension(info, 2); // 2: level and peak
|
|
||||||
CTLID_DEBUG(("VU-meters id=%d\n", numid));
|
CTLID_DEBUG(("VU-meters id=%d\n", numid));
|
||||||
} else if (!strcmp("Channels info", snd_ctl_elem_id_get_name(id))) {
|
} else if (!strcmp("Channels info", snd_ctl_elem_id_get_name(id))) {
|
||||||
channelsId=numid;
|
channelsId=numid;
|
||||||
|
|
@ -1867,7 +1871,7 @@ int main(int argc, char *argv[]) {
|
||||||
GtkWidget *label, *menu, *menuitem;
|
GtkWidget *label, *menu, *menuitem;
|
||||||
GSList *bgroup;
|
GSList *bgroup;
|
||||||
int err, i, o, n, cardnum, value;
|
int err, i, o, n, cardnum, value;
|
||||||
char hwname[8], cardname[32], load, save;
|
char hwname[16], cardname[32], load, save;
|
||||||
snd_ctl_card_info_t *hw_info;
|
snd_ctl_card_info_t *hw_info;
|
||||||
|
|
||||||
load=save=1;
|
load=save=1;
|
||||||
|
|
@ -1888,8 +1892,8 @@ int main(int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
if ((err=snd_ctl_card_info(ctlhandle, hw_info))>=0) {
|
if ((err=snd_ctl_card_info(ctlhandle, hw_info))>=0) {
|
||||||
if (!strncmp(snd_ctl_card_info_get_driver(hw_info), "Echo_", 5)) {
|
if (!strncmp(snd_ctl_card_info_get_driver(hw_info), "Echo_", 5)) {
|
||||||
strncpy(card, hwname, 7);
|
strncpy(card, hwname, sizeof(hwname)-1);
|
||||||
hwname[7]=0;
|
card[sizeof(hwname)-1]=0;
|
||||||
strncpy(cardname, snd_ctl_card_info_get_name(hw_info), 31);
|
strncpy(cardname, snd_ctl_card_info_get_name(hw_info), 31);
|
||||||
cardname[31]=0;
|
cardname[31]=0;
|
||||||
strncpy(cardId, snd_ctl_card_info_get_name(hw_info), 15);
|
strncpy(cardId, snd_ctl_card_info_get_name(hw_info), 15);
|
||||||
|
|
@ -2093,7 +2097,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||||
for (i=0; i<ndmodes; i++) {
|
for (i=0; i<ndmodes; i++) {
|
||||||
menuitem=gtk_menu_item_new_with_label(dmodeName[i]);
|
menuitem=gtk_menu_item_new_with_label(dmodeName[i]);
|
||||||
gtk_widget_show(menuitem);
|
gtk_widget_show(menuitem);
|
||||||
gtk_signal_connect(GTK_OBJECT(menuitem), "activate", Digital_mode_activate, (gpointer)(long)i);
|
gtk_signal_connect(GTK_OBJECT(menuitem), "activate", G_CALLBACK(Digital_mode_activate), (gpointer)(long)i);
|
||||||
gtk_menu_append(GTK_MENU(menu), menuitem);
|
gtk_menu_append(GTK_MENU(menu), menuitem);
|
||||||
}
|
}
|
||||||
gtk_option_menu_set_menu(GTK_OPTION_MENU(dmodeOpt), menu);
|
gtk_option_menu_set_menu(GTK_OPTION_MENU(dmodeOpt), menu);
|
||||||
|
|
@ -2119,7 +2123,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||||
clocksrc_menuitem[i]=gtk_menu_item_new_with_label(clocksrcName[i]);
|
clocksrc_menuitem[i]=gtk_menu_item_new_with_label(clocksrcName[i]);
|
||||||
gtk_widget_show(clocksrc_menuitem[i]);
|
gtk_widget_show(clocksrc_menuitem[i]);
|
||||||
gtk_widget_set_sensitive(clocksrc_menuitem[i], FALSE);
|
gtk_widget_set_sensitive(clocksrc_menuitem[i], FALSE);
|
||||||
gtk_signal_connect(GTK_OBJECT(clocksrc_menuitem[i]), "activate", Clock_source_activate, (gpointer)(long)i);
|
gtk_signal_connect(GTK_OBJECT(clocksrc_menuitem[i]), "activate", G_CALLBACK(Clock_source_activate), (gpointer)(long)i);
|
||||||
gtk_menu_append(GTK_MENU(menu), clocksrc_menuitem[i]);
|
gtk_menu_append(GTK_MENU(menu), clocksrc_menuitem[i]);
|
||||||
}
|
}
|
||||||
gtk_option_menu_set_menu(GTK_OPTION_MENU(clocksrcOpt), menu);
|
gtk_option_menu_set_menu(GTK_OPTION_MENU(clocksrcOpt), menu);
|
||||||
|
|
@ -2145,7 +2149,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||||
for (i=0; i<nspdifmodes; i++) {
|
for (i=0; i<nspdifmodes; i++) {
|
||||||
menuitem=gtk_menu_item_new_with_label(spdifmodeName[i]);
|
menuitem=gtk_menu_item_new_with_label(spdifmodeName[i]);
|
||||||
gtk_widget_show(menuitem);
|
gtk_widget_show(menuitem);
|
||||||
gtk_signal_connect(GTK_OBJECT(menuitem), "activate", SPDIF_mode_activate, (gpointer)(long)i);
|
gtk_signal_connect(GTK_OBJECT(menuitem), "activate", G_CALLBACK(SPDIF_mode_activate), (gpointer)(long)i);
|
||||||
gtk_menu_append(GTK_MENU(menu), menuitem);
|
gtk_menu_append(GTK_MENU(menu), menuitem);
|
||||||
}
|
}
|
||||||
gtk_option_menu_set_menu(GTK_OPTION_MENU(spdifmodeOpt), menu);
|
gtk_option_menu_set_menu(GTK_OPTION_MENU(spdifmodeOpt), menu);
|
||||||
|
|
@ -2170,7 +2174,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, FALSE, 0);
|
||||||
ReadControl(&i, 1, PhantomPower.id, SND_CTL_ELEM_IFACE_MIXER);
|
ReadControl(&i, 1, PhantomPower.id, SND_CTL_ELEM_IFACE_MIXER);
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), i);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), i);
|
||||||
gtk_signal_connect(GTK_OBJECT(button), "toggled", Switch_toggled, (gpointer)&PhantomPower);
|
gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(Switch_toggled), (gpointer)&PhantomPower);
|
||||||
PhantomPower.Button=button;
|
PhantomPower.Button=button;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2181,7 +2185,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, FALSE, 0);
|
||||||
ReadControl(&i, 1, Automute.id, SND_CTL_ELEM_IFACE_CARD);
|
ReadControl(&i, 1, Automute.id, SND_CTL_ELEM_IFACE_CARD);
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), i);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), i);
|
||||||
gtk_signal_connect(GTK_OBJECT(button), "toggled", Switch_toggled, (gpointer)&Automute);
|
gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(Switch_toggled), (gpointer)&Automute);
|
||||||
Automute.Button=button;
|
Automute.Button=button;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2190,7 +2194,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||||
autoclockChkbutton=gtk_check_button_new_with_label("Autoclock");
|
autoclockChkbutton=gtk_check_button_new_with_label("Autoclock");
|
||||||
gtk_widget_show(autoclockChkbutton);
|
gtk_widget_show(autoclockChkbutton);
|
||||||
gtk_box_pack_start(GTK_BOX(hbox), autoclockChkbutton, TRUE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(hbox), autoclockChkbutton, TRUE, FALSE, 0);
|
||||||
gtk_signal_connect(GTK_OBJECT(autoclockChkbutton), "toggled", AutoClock_toggled, NULL);
|
gtk_signal_connect(GTK_OBJECT(autoclockChkbutton), "toggled", G_CALLBACK(AutoClock_toggled), NULL);
|
||||||
AutoClock=-1;
|
AutoClock=-1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2660,7 +2664,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0);
|
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0);
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), 1);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), 1);
|
||||||
gtk_widget_show(button);
|
gtk_widget_show(button);
|
||||||
gtk_signal_connect(GTK_OBJECT(button), "toggled", Gang_button_toggled, 0);
|
gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(Gang_button_toggled), 0);
|
||||||
|
|
||||||
// Controls frame
|
// Controls frame
|
||||||
frame=gtk_frame_new("Controls");
|
frame=gtk_frame_new("Controls");
|
||||||
|
|
@ -2675,7 +2679,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||||
button=gtk_toggle_button_new_with_label("VU");
|
button=gtk_toggle_button_new_with_label("VU");
|
||||||
gtk_widget_show(button);
|
gtk_widget_show(button);
|
||||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
||||||
gtk_signal_connect(GTK_OBJECT(button), "toggled", VUmeters_button_click, 0);
|
gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(VUmeters_button_click), 0);
|
||||||
VUw_geom.toggler=button;
|
VUw_geom.toggler=button;
|
||||||
if (VUw_geom.st==1)
|
if (VUw_geom.st==1)
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
||||||
|
|
@ -2685,7 +2689,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||||
button=gtk_toggle_button_new_with_label("Line");
|
button=gtk_toggle_button_new_with_label("Line");
|
||||||
gtk_widget_show(button);
|
gtk_widget_show(button);
|
||||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
||||||
gtk_signal_connect(GTK_OBJECT(button), "toggled", ToggleWindow, (gpointer)LVwindow);
|
gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(ToggleWindow), (gpointer)LVwindow);
|
||||||
LVw_geom.toggler=button;
|
LVw_geom.toggler=button;
|
||||||
if (LVw_geom.st==1)
|
if (LVw_geom.st==1)
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
||||||
|
|
@ -2695,7 +2699,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||||
button=gtk_toggle_button_new_with_label("Misc");
|
button=gtk_toggle_button_new_with_label("Misc");
|
||||||
gtk_widget_show(button);
|
gtk_widget_show(button);
|
||||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
||||||
gtk_signal_connect(GTK_OBJECT(button), "toggled", ToggleWindow, (gpointer)Miscwindow);
|
gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(ToggleWindow), (gpointer)Miscwindow);
|
||||||
Miscw_geom.toggler=button;
|
Miscw_geom.toggler=button;
|
||||||
if (Miscw_geom.st==1)
|
if (Miscw_geom.st==1)
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
||||||
|
|
@ -2706,7 +2710,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||||
button=gtk_toggle_button_new_with_label("GrMix");
|
button=gtk_toggle_button_new_with_label("GrMix");
|
||||||
gtk_widget_show(button);
|
gtk_widget_show(button);
|
||||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
||||||
gtk_signal_connect(GTK_OBJECT(button), "toggled", GMixer_button_click, 0);
|
gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(GMixer_button_click), 0);
|
||||||
GMw_geom.toggler=button;
|
GMw_geom.toggler=button;
|
||||||
if (GMw_geom.st==1)
|
if (GMw_geom.st==1)
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
||||||
|
|
@ -2715,7 +2719,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||||
button=gtk_toggle_button_new_with_label("Mixer");
|
button=gtk_toggle_button_new_with_label("Mixer");
|
||||||
gtk_widget_show(button);
|
gtk_widget_show(button);
|
||||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
||||||
gtk_signal_connect(GTK_OBJECT(button), "toggled", ToggleWindow, (gpointer)mixerControl.window);
|
gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(ToggleWindow), (gpointer)mixerControl.window);
|
||||||
Mixerw_geom.toggler=button;
|
Mixerw_geom.toggler=button;
|
||||||
if (Mixerw_geom.st==1)
|
if (Mixerw_geom.st==1)
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
||||||
|
|
@ -2726,7 +2730,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||||
button=gtk_toggle_button_new_with_label("Vmixer");
|
button=gtk_toggle_button_new_with_label("Vmixer");
|
||||||
gtk_widget_show(button);
|
gtk_widget_show(button);
|
||||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
||||||
gtk_signal_connect(GTK_OBJECT(button), "toggled", ToggleWindow, (gpointer)vmixerControl.window);
|
gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(ToggleWindow), (gpointer)vmixerControl.window);
|
||||||
Vmixerw_geom.toggler=button;
|
Vmixerw_geom.toggler=button;
|
||||||
if (Vmixerw_geom.st==1)
|
if (Vmixerw_geom.st==1)
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
||||||
|
|
@ -2737,7 +2741,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||||
button=gtk_toggle_button_new_with_label("PCM");
|
button=gtk_toggle_button_new_with_label("PCM");
|
||||||
gtk_widget_show(button);
|
gtk_widget_show(button);
|
||||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
||||||
gtk_signal_connect(GTK_OBJECT(button), "toggled", ToggleWindow, (gpointer)pcmoutControl.window);
|
gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(ToggleWindow), (gpointer)pcmoutControl.window);
|
||||||
PVw_geom.toggler=button;
|
PVw_geom.toggler=button;
|
||||||
if (PVw_geom.st==1)
|
if (PVw_geom.st==1)
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
SUBDIRS = desktop
|
||||||
AM_CFLAGS = @ENVY24CONTROL_CFLAGS@
|
AM_CFLAGS = @ENVY24CONTROL_CFLAGS@
|
||||||
bin_PROGRAMS = envy24control
|
bin_PROGRAMS = envy24control
|
||||||
man_MANS = envy24control.1
|
man_MANS = envy24control.1
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,8 @@ void config_close()
|
||||||
|
|
||||||
void config_set_stereo(GtkWidget *but, gpointer data)
|
void config_set_stereo(GtkWidget *but, gpointer data)
|
||||||
{
|
{
|
||||||
gint i=(gint)data;
|
gint i=GPOINTER_TO_INT(data);
|
||||||
config_stereo[i]=GTK_TOGGLE_BUTTON(but)->active;
|
config_stereo[i]=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(but));
|
||||||
}
|
}
|
||||||
|
|
||||||
void config_restore_stereo()
|
void config_restore_stereo()
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,6 @@ AC_HEADER_STDC
|
||||||
AM_INIT_AUTOMAKE
|
AM_INIT_AUTOMAKE
|
||||||
AM_MAINTAINER_MODE([enable])
|
AM_MAINTAINER_MODE([enable])
|
||||||
|
|
||||||
PKG_CHECK_MODULES(ENVY24CONTROL, gtk+-2.0 alsa >= 0.9.0)
|
PKG_CHECK_MODULES(ENVY24CONTROL, gtk+-3.0 alsa >= 0.9.0)
|
||||||
|
|
||||||
AC_OUTPUT(Makefile)
|
AC_OUTPUT(Makefile desktop/Makefile)
|
||||||
|
|
|
||||||
34
envy24control/desktop/Makefile.am
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
APPNAME = envy24control
|
||||||
|
|
||||||
|
desktopdir = $(datadir)/applications
|
||||||
|
desktop_DATA = $(APPNAME).desktop
|
||||||
|
|
||||||
|
public_icons = \
|
||||||
|
hicolor_apps_48x48_$(APPNAME).png
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
$(public_icons) \
|
||||||
|
$(desktop_DATA)
|
||||||
|
|
||||||
|
install-icons:
|
||||||
|
for icon in $(public_icons); do \
|
||||||
|
THEME=`echo $$icon | cut -d_ -f1`; \
|
||||||
|
CONTEXT=`echo $$icon | cut -d_ -f2`; \
|
||||||
|
SIZE=`echo $$icon | cut -d_ -f3`; \
|
||||||
|
ICONFILE=`echo $$icon | cut -d_ -f4`; \
|
||||||
|
mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
|
||||||
|
$(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-icons:
|
||||||
|
-for icon in $(public_icons); do \
|
||||||
|
THEME=`echo $$icon | cut -d_ -f1`; \
|
||||||
|
CONTEXT=`echo $$icon | cut -d_ -f2`; \
|
||||||
|
SIZE=`echo $$icon | cut -d_ -f3`; \
|
||||||
|
ICONFILE=`echo $$icon | cut -d_ -f4`; \
|
||||||
|
rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
|
||||||
|
done
|
||||||
|
|
||||||
|
install-data-local: install-icons
|
||||||
|
|
||||||
|
uninstall-local: uninstall-icons
|
||||||
10
envy24control/desktop/envy24control.desktop
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Envy24 Control
|
||||||
|
GenericName=Envy24 Control Utility
|
||||||
|
Comment=Mixer and GUI control utility for Envy24-based sound cards
|
||||||
|
Exec=envy24control
|
||||||
|
Icon=envy24control
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=AudioVideo;
|
||||||
|
Version=0.9.4
|
||||||
BIN
envy24control/desktop/hicolor_apps_48x48_envy24control.png
Normal file
|
After Width: | Height: | Size: 945 B |
|
|
@ -14,12 +14,12 @@
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include "envy24control.h"
|
#include "envy24control.h"
|
||||||
|
|
||||||
void control_input_callback(gpointer data, gint source, GdkInputCondition condition)
|
gboolean control_input_callback(GIOChannel *source, GIOCondition condition, gpointer data)
|
||||||
{
|
{
|
||||||
snd_ctl_t *ctl = (snd_ctl_t *)data;
|
snd_ctl_t *ctl = (snd_ctl_t *)data;
|
||||||
snd_ctl_event_t *ev;
|
snd_ctl_event_t *ev;
|
||||||
|
|
@ -29,12 +29,12 @@ void control_input_callback(gpointer data, gint source, GdkInputCondition condit
|
||||||
|
|
||||||
snd_ctl_event_alloca(&ev);
|
snd_ctl_event_alloca(&ev);
|
||||||
if (snd_ctl_read(ctl, ev) < 0)
|
if (snd_ctl_read(ctl, ev) < 0)
|
||||||
return;
|
return TRUE;
|
||||||
name = snd_ctl_event_elem_get_name(ev);
|
name = snd_ctl_event_elem_get_name(ev);
|
||||||
index = snd_ctl_event_elem_get_index(ev);
|
index = snd_ctl_event_elem_get_index(ev);
|
||||||
mask = snd_ctl_event_elem_get_mask(ev);
|
mask = snd_ctl_event_elem_get_mask(ev);
|
||||||
if (! (mask & (SND_CTL_EVENT_MASK_VALUE | SND_CTL_EVENT_MASK_INFO)))
|
if (! (mask & (SND_CTL_EVENT_MASK_VALUE | SND_CTL_EVENT_MASK_INFO)))
|
||||||
return;
|
return TRUE;
|
||||||
|
|
||||||
switch (snd_ctl_event_elem_get_interface(ev)) {
|
switch (snd_ctl_event_elem_get_interface(ev)) {
|
||||||
case SND_CTL_ELEM_IFACE_MIXER:
|
case SND_CTL_ELEM_IFACE_MIXER:
|
||||||
|
|
@ -81,8 +81,13 @@ void control_input_callback(gpointer data, gint source, GdkInputCondition condit
|
||||||
else if (!strcmp(name, "Input Sensitivity Switch"))
|
else if (!strcmp(name, "Input Sensitivity Switch"))
|
||||||
adc_sense_update(index);
|
adc_sense_update(index);
|
||||||
break;
|
break;
|
||||||
|
case SND_CTL_ELEM_IFACE_PCM:
|
||||||
|
if (!strcmp(name, "IEC958 Playback Default"))
|
||||||
|
spdif_output_update();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ extern ice1712_eeprom_t card_eeprom;
|
||||||
extern GtkWidget *mixer_mix_drawing;
|
extern GtkWidget *mixer_mix_drawing;
|
||||||
extern GtkWidget *mixer_clear_peaks_button;
|
extern GtkWidget *mixer_clear_peaks_button;
|
||||||
extern GtkWidget *mixer_drawing[20];
|
extern GtkWidget *mixer_drawing[20];
|
||||||
extern GtkObject *mixer_adj[20][2];
|
extern GtkAdjustment *mixer_adj[20][2];
|
||||||
extern GtkWidget *mixer_vscale[20][2];
|
extern GtkWidget *mixer_vscale[20][2];
|
||||||
extern GtkWidget *mixer_solo_toggle[20][2];
|
extern GtkWidget *mixer_solo_toggle[20][2];
|
||||||
extern GtkWidget *mixer_mute_toggle[20][2];
|
extern GtkWidget *mixer_mute_toggle[20][2];
|
||||||
|
|
@ -108,7 +108,7 @@ extern GtkWidget *hw_master_clock_actual_rate_label;
|
||||||
extern GtkWidget *hw_rate_locking_check;
|
extern GtkWidget *hw_rate_locking_check;
|
||||||
extern GtkWidget *hw_rate_reset_check;
|
extern GtkWidget *hw_rate_reset_check;
|
||||||
|
|
||||||
extern GtkObject *hw_volume_change_adj;
|
extern GtkAdjustment *hw_volume_change_adj;
|
||||||
extern GtkWidget *hw_volume_change_spin;
|
extern GtkWidget *hw_volume_change_spin;
|
||||||
|
|
||||||
extern GtkWidget *hw_spdif_profi_nonaudio_radio;
|
extern GtkWidget *hw_spdif_profi_nonaudio_radio;
|
||||||
|
|
@ -151,9 +151,9 @@ extern GtkWidget *input_interface_internal;
|
||||||
extern GtkWidget *input_interface_front_input;
|
extern GtkWidget *input_interface_front_input;
|
||||||
extern GtkWidget *input_interface_rear_input;
|
extern GtkWidget *input_interface_rear_input;
|
||||||
extern GtkWidget *input_interface_wavetable;
|
extern GtkWidget *input_interface_wavetable;
|
||||||
extern GtkObject *av_dac_volume_adj[];
|
extern GtkAdjustment *av_dac_volume_adj[];
|
||||||
extern GtkObject *av_adc_volume_adj[];
|
extern GtkAdjustment *av_adc_volume_adj[];
|
||||||
extern GtkObject *av_ipga_volume_adj[];
|
extern GtkAdjustment *av_ipga_volume_adj[];
|
||||||
extern GtkLabel *av_dac_volume_label[];
|
extern GtkLabel *av_dac_volume_label[];
|
||||||
extern GtkLabel *av_adc_volume_label[];
|
extern GtkLabel *av_adc_volume_label[];
|
||||||
extern GtkLabel *av_ipga_volume_label[];
|
extern GtkLabel *av_ipga_volume_label[];
|
||||||
|
|
@ -163,8 +163,7 @@ extern GtkWidget *av_adc_sense_radio[][4];
|
||||||
/* flags */
|
/* flags */
|
||||||
extern int card_is_dmx6fire;
|
extern int card_is_dmx6fire;
|
||||||
|
|
||||||
gint level_meters_configure_event(GtkWidget *widget, GdkEventConfigure *event);
|
gboolean level_meters_draw_callback(GtkWidget *widget, cairo_t *cr, gpointer data);
|
||||||
gint level_meters_expose_event(GtkWidget *widget, GdkEventExpose *event);
|
|
||||||
gint level_meters_timeout_callback(gpointer data);
|
gint level_meters_timeout_callback(gpointer data);
|
||||||
void level_meters_reset_peaks(GtkButton *button, gpointer data);
|
void level_meters_reset_peaks(GtkButton *button, gpointer data);
|
||||||
void level_meters_init(void);
|
void level_meters_init(void);
|
||||||
|
|
@ -238,6 +237,5 @@ void ipga_volume_adjust(GtkAdjustment *adj, gpointer data);
|
||||||
void dac_sense_toggled(GtkWidget *togglebutton, gpointer data);
|
void dac_sense_toggled(GtkWidget *togglebutton, gpointer data);
|
||||||
void adc_sense_toggled(GtkWidget *togglebutton, gpointer data);
|
void adc_sense_toggled(GtkWidget *togglebutton, gpointer data);
|
||||||
|
|
||||||
void control_input_callback(gpointer data, gint source, GdkInputCondition condition);
|
gboolean control_input_callback(GIOChannel *gio, GIOCondition condition, gpointer data);
|
||||||
void mixer_input_callback(gpointer data, gint source, GdkInputCondition condition);
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include "envy24control.h"
|
#include "envy24control.h"
|
||||||
|
|
@ -39,7 +39,14 @@ static inline int is_update_needed(void);
|
||||||
|
|
||||||
static int is_active(GtkWidget *widget)
|
static int is_active(GtkWidget *widget)
|
||||||
{
|
{
|
||||||
return GTK_TOGGLE_BUTTON(widget)->active ? 1 : 0;
|
return gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)) ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void label_set(GtkWidget* widget, const char* str)
|
||||||
|
{
|
||||||
|
const char* old = gtk_label_get_text(GTK_LABEL(widget));
|
||||||
|
if (strcmp(old, str))
|
||||||
|
gtk_label_set_text(GTK_LABEL(widget), str);
|
||||||
}
|
}
|
||||||
|
|
||||||
void master_clock_update(void)
|
void master_clock_update(void)
|
||||||
|
|
@ -170,8 +177,8 @@ gint master_clock_status_timeout_callback(gpointer data)
|
||||||
snd_ctl_elem_value_set_name(sw, "Word Clock Status");
|
snd_ctl_elem_value_set_name(sw, "Word Clock Status");
|
||||||
if ((err = snd_ctl_elem_read(ctl, sw)) < 0)
|
if ((err = snd_ctl_elem_read(ctl, sw)) < 0)
|
||||||
g_print("Unable to determine word clock status: %s\n", snd_strerror(err));
|
g_print("Unable to determine word clock status: %s\n", snd_strerror(err));
|
||||||
gtk_label_set_text(GTK_LABEL(hw_master_clock_status_label),
|
label_set(hw_master_clock_status_label,
|
||||||
snd_ctl_elem_value_get_boolean(sw, 0) ? "No signal" : "Locked");
|
snd_ctl_elem_value_get_boolean(sw, 0) ? "No signal" : "Locked");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -246,7 +253,7 @@ gint internal_clock_status_timeout_callback(gpointer data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gtk_label_set_text(GTK_LABEL(hw_master_clock_actual_rate_label), label);
|
label_set(hw_master_clock_actual_rate_label, label);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -354,7 +361,7 @@ void volume_change_rate_adj(GtkAdjustment *adj, gpointer data)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
snd_ctl_elem_value_set_integer(volume_rate, 0, adj->value);
|
snd_ctl_elem_value_set_integer(volume_rate, 0, gtk_adjustment_get_value(adj));
|
||||||
if ((err = snd_ctl_elem_write(ctl, volume_rate)) < 0)
|
if ((err = snd_ctl_elem_write(ctl, volume_rate)) < 0)
|
||||||
g_print("Unable to write volume change rate: %s\n", snd_strerror(err));
|
g_print("Unable to write volume change rate: %s\n", snd_strerror(err));
|
||||||
}
|
}
|
||||||
|
|
@ -455,9 +462,9 @@ void profi_stream_toggled(GtkWidget *togglebutton, gpointer data)
|
||||||
return;
|
return;
|
||||||
iec958.status[1] &= ~IEC958_AES1_PRO_MODE;
|
iec958.status[1] &= ~IEC958_AES1_PRO_MODE;
|
||||||
if (!strcmp(str, "NOTID")) {
|
if (!strcmp(str, "NOTID")) {
|
||||||
iec958.status[0] |= IEC958_AES1_PRO_MODE_STEREOPHONIC;
|
iec958.status[1] |= IEC958_AES1_PRO_MODE_NOTID;
|
||||||
} else if (!strcmp(str, "Stereo")) {
|
} else if (!strcmp(str, "Stereo")) {
|
||||||
iec958.status[0] |= IEC958_AES1_PRO_MODE_NOTID;
|
iec958.status[1] |= IEC958_AES1_PRO_MODE_STEREOPHONIC;
|
||||||
}
|
}
|
||||||
snd_ctl_elem_value_set_iec958(spdif_output, &iec958);
|
snd_ctl_elem_value_set_iec958(spdif_output, &iec958);
|
||||||
spdif_output_write();
|
spdif_output_write();
|
||||||
|
|
@ -500,7 +507,7 @@ void consumer_copyright_toggled(GtkWidget *togglebutton, gpointer data)
|
||||||
if (!strcmp(str, "Copyright")) {
|
if (!strcmp(str, "Copyright")) {
|
||||||
iec958.status[0] &= ~IEC958_AES0_CON_NOT_COPYRIGHT;
|
iec958.status[0] &= ~IEC958_AES0_CON_NOT_COPYRIGHT;
|
||||||
} else if (!strcmp(str, "Permitted")) {
|
} else if (!strcmp(str, "Permitted")) {
|
||||||
iec958.status[1] |= IEC958_AES0_CON_NOT_COPYRIGHT;
|
iec958.status[0] |= IEC958_AES0_CON_NOT_COPYRIGHT;
|
||||||
}
|
}
|
||||||
snd_ctl_elem_value_set_iec958(spdif_output, &iec958);
|
snd_ctl_elem_value_set_iec958(spdif_output, &iec958);
|
||||||
spdif_output_write();
|
spdif_output_write();
|
||||||
|
|
@ -517,9 +524,9 @@ void consumer_copy_toggled(GtkWidget *togglebutton, gpointer data)
|
||||||
if (iec958.status[0] & IEC958_AES0_PROFESSIONAL)
|
if (iec958.status[0] & IEC958_AES0_PROFESSIONAL)
|
||||||
return;
|
return;
|
||||||
if (!strcmp(str, "1st")) {
|
if (!strcmp(str, "1st")) {
|
||||||
iec958.status[0] |= IEC958_AES1_CON_ORIGINAL;
|
|
||||||
} else if (!strcmp(str, "Original")) {
|
|
||||||
iec958.status[1] &= ~IEC958_AES1_CON_ORIGINAL;
|
iec958.status[1] &= ~IEC958_AES1_CON_ORIGINAL;
|
||||||
|
} else if (!strcmp(str, "Original")) {
|
||||||
|
iec958.status[1] |= IEC958_AES1_CON_ORIGINAL;
|
||||||
}
|
}
|
||||||
snd_ctl_elem_value_set_iec958(spdif_output, &iec958);
|
snd_ctl_elem_value_set_iec958(spdif_output, &iec958);
|
||||||
spdif_output_write();
|
spdif_output_write();
|
||||||
|
|
@ -539,7 +546,7 @@ void consumer_emphasis_toggled(GtkWidget *togglebutton, gpointer data)
|
||||||
if (!strcmp(str, "No")) {
|
if (!strcmp(str, "No")) {
|
||||||
iec958.status[0] |= IEC958_AES0_CON_EMPHASIS_NONE;
|
iec958.status[0] |= IEC958_AES0_CON_EMPHASIS_NONE;
|
||||||
} else if (!strcmp(str, "5015")) {
|
} else if (!strcmp(str, "5015")) {
|
||||||
iec958.status[1] |= ~IEC958_AES0_CON_EMPHASIS_5015;
|
iec958.status[0] |= IEC958_AES0_CON_EMPHASIS_5015;
|
||||||
}
|
}
|
||||||
snd_ctl_elem_value_set_iec958(spdif_output, &iec958);
|
snd_ctl_elem_value_set_iec958(spdif_output, &iec958);
|
||||||
spdif_output_write();
|
spdif_output_write();
|
||||||
|
|
@ -555,15 +562,15 @@ void consumer_category_toggled(GtkWidget *togglebutton, gpointer data)
|
||||||
return;
|
return;
|
||||||
if (iec958.status[0] & IEC958_AES0_PROFESSIONAL)
|
if (iec958.status[0] & IEC958_AES0_PROFESSIONAL)
|
||||||
return;
|
return;
|
||||||
iec958.status[0] &= ~IEC958_AES1_CON_CATEGORY;
|
iec958.status[1] &= ~IEC958_AES1_CON_CATEGORY;
|
||||||
if (!strcmp(str, "DAT")) {
|
if (!strcmp(str, "DAT")) {
|
||||||
iec958.status[0] |= IEC958_AES1_CON_DAT;
|
iec958.status[1] |= IEC958_AES1_CON_DAT;
|
||||||
} else if (!strcmp(str, "PCM")) {
|
} else if (!strcmp(str, "PCM")) {
|
||||||
iec958.status[0] |= IEC958_AES1_CON_PCM_CODER;
|
iec958.status[1] |= IEC958_AES1_CON_PCM_CODER;
|
||||||
} else if (!strcmp(str, "CD")) {
|
} else if (!strcmp(str, "CD")) {
|
||||||
iec958.status[0] |= IEC958_AES1_CON_IEC908_CD;
|
iec958.status[1] |= IEC958_AES1_CON_IEC908_CD;
|
||||||
} else if (!strcmp(str, "General")) {
|
} else if (!strcmp(str, "General")) {
|
||||||
iec958.status[0] |= IEC958_AES1_CON_GENERAL;
|
iec958.status[1] |= IEC958_AES1_CON_GENERAL;
|
||||||
}
|
}
|
||||||
snd_ctl_elem_value_set_iec958(spdif_output, &iec958);
|
snd_ctl_elem_value_set_iec958(spdif_output, &iec958);
|
||||||
spdif_output_write();
|
spdif_output_write();
|
||||||
|
|
@ -598,7 +605,7 @@ void spdif_output_toggled(GtkWidget *togglebutton, gpointer data)
|
||||||
page = 1;
|
page = 1;
|
||||||
}
|
}
|
||||||
spdif_output_write();
|
spdif_output_write();
|
||||||
gtk_notebook_set_page(GTK_NOTEBOOK(hw_spdif_output_notebook), page);
|
gtk_notebook_set_current_page(GTK_NOTEBOOK(hw_spdif_output_notebook), page);
|
||||||
spdif_output_update();
|
spdif_output_update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,18 +14,18 @@
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include "envy24control.h"
|
#include "envy24control.h"
|
||||||
|
|
||||||
static GdkGC *penGreenShadow[21] = { NULL, };
|
static GdkRGBA *penGreenShadow = NULL;
|
||||||
static GdkGC *penGreenLight[21] = { NULL, };
|
static GdkRGBA *penGreenLight = NULL;
|
||||||
static GdkGC *penOrangeShadow[21] = { NULL, };
|
static GdkRGBA *penOrangeShadow = NULL;
|
||||||
static GdkGC *penOrangeLight[21] = { NULL, };
|
static GdkRGBA *penOrangeLight = NULL;
|
||||||
static GdkGC *penRedShadow[21] = { NULL, };
|
static GdkRGBA *penRedShadow = NULL;
|
||||||
static GdkGC *penRedLight[21] = { NULL, };
|
static GdkRGBA *penRedLight = NULL;
|
||||||
static GdkPixmap *pixmap[21] = { NULL, };
|
static int level[22] = { 0 };
|
||||||
static snd_ctl_elem_value_t *peaks;
|
static snd_ctl_elem_value_t *peaks;
|
||||||
|
|
||||||
extern int input_channels, output_channels, pcm_output_channels, spdif_channels, view_spdif_playback;
|
extern int input_channels, output_channels, pcm_output_channels, spdif_channels, view_spdif_playback;
|
||||||
|
|
@ -50,22 +50,19 @@ static void get_levels(int idx, int *l1, int *l2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static GdkGC *get_pen(int idx, int nRed, int nGreen, int nBlue)
|
static GdkRGBA *get_pen(int nRed, int nGreen, int nBlue)
|
||||||
{
|
{
|
||||||
GdkColor *c;
|
GdkRGBA *c;
|
||||||
GdkGC *gc;
|
|
||||||
|
|
||||||
c = (GdkColor *)g_malloc(sizeof(GdkColor));
|
c = (GdkRGBA *)g_malloc(sizeof(GdkRGBA));
|
||||||
c->red = nRed;
|
c->red = nRed / 65535.0;
|
||||||
c->green = nGreen;
|
c->green = nGreen / 65535.0;
|
||||||
c->blue = nBlue;
|
c->blue = nBlue / 65535.0;
|
||||||
gdk_color_alloc(gdk_colormap_get_system(), c);
|
c->alpha = 1.0;
|
||||||
gc = gdk_gc_new(pixmap[idx]);
|
return c;
|
||||||
gdk_gc_set_foreground(gc, c);
|
|
||||||
return gc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_index(gchar *name)
|
static int get_index(const gchar *name)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
|
|
@ -79,7 +76,7 @@ static int get_index(gchar *name)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void redraw_meters(int idx, int width, int height, int level1, int level2)
|
static void redraw_meters(int idx, int width, int height, int level1, int level2, cairo_t *cr)
|
||||||
{
|
{
|
||||||
int stereo = idx == 0;
|
int stereo = idx == 0;
|
||||||
int segment_width = stereo ? (width / 2) - 8 : width - 12;
|
int segment_width = stereo ? (width / 2) - 8 : width - 12;
|
||||||
|
|
@ -90,167 +87,156 @@ static void redraw_meters(int idx, int width, int height, int level1, int level2
|
||||||
int seg;
|
int seg;
|
||||||
int segs_on1 = ((segments * level1) + 128) / 255;
|
int segs_on1 = ((segments * level1) + 128) / 255;
|
||||||
int segs_on2 = ((segments * level2) + 128) / 255;
|
int segs_on2 = ((segments * level2) + 128) / 255;
|
||||||
|
int end_seg;
|
||||||
|
GdkRectangle clip;
|
||||||
|
|
||||||
// g_print("segs_on1 = %i (%i), segs_on2 = %i (%i)\n", segs_on1, level1, segs_on2, level2);
|
// g_print("segs_on1 = %i (%i), segs_on2 = %i (%i)\n", segs_on1, level1, segs_on2, level2);
|
||||||
for (seg = 0; seg < green_segments; seg++) {
|
cairo_rectangle(cr, 0, 0, width, height);
|
||||||
gdk_draw_rectangle(pixmap[idx],
|
cairo_fill(cr);
|
||||||
segs_on1 > 0 ? penGreenLight[idx] : penGreenShadow[idx],
|
|
||||||
TRUE,
|
gdk_cairo_get_clip_rectangle(cr, &clip);
|
||||||
6, 3 + ((segments - seg - 1) * 4),
|
seg = segments - (clip.y + clip.height) / 4;
|
||||||
segment_width,
|
if (seg < 0)
|
||||||
3);
|
seg = 0;
|
||||||
if (stereo)
|
segs_on1 -= seg;
|
||||||
gdk_draw_rectangle(pixmap[idx],
|
segs_on2 -= seg;
|
||||||
segs_on2 > 0 ? penGreenLight[idx] : penGreenShadow[idx],
|
end_seg = segments - (clip.y - 2) / 4;
|
||||||
TRUE,
|
|
||||||
2 + (width / 2),
|
for (; seg < green_segments && seg < end_seg; seg++) {
|
||||||
3 + ((segments - seg - 1) * 4),
|
gdk_cairo_set_source_rgba(cr,
|
||||||
segment_width,
|
segs_on1 > 0 ? penGreenLight : penGreenShadow);
|
||||||
3);
|
cairo_rectangle(cr,
|
||||||
|
6, 3 + ((segments - seg - 1) * 4),
|
||||||
|
segment_width,
|
||||||
|
3);
|
||||||
|
cairo_fill(cr);
|
||||||
|
if (stereo) {
|
||||||
|
gdk_cairo_set_source_rgba(cr,
|
||||||
|
segs_on2 > 0 ? penGreenLight : penGreenShadow);
|
||||||
|
cairo_rectangle(cr,
|
||||||
|
2 + (width / 2),
|
||||||
|
3 + ((segments - seg - 1) * 4),
|
||||||
|
segment_width,
|
||||||
|
3);
|
||||||
|
cairo_fill(cr);
|
||||||
|
}
|
||||||
segs_on1--;
|
segs_on1--;
|
||||||
segs_on2--;
|
segs_on2--;
|
||||||
}
|
}
|
||||||
for (seg = green_segments; seg < green_segments + orange_segments; seg++) {
|
for (; seg < green_segments + orange_segments && seg < end_seg; seg++) {
|
||||||
gdk_draw_rectangle(pixmap[idx],
|
gdk_cairo_set_source_rgba(cr,
|
||||||
segs_on1 > 0 ? penOrangeLight[idx] : penOrangeShadow[idx],
|
segs_on1 > 0 ? penOrangeLight : penOrangeShadow);
|
||||||
TRUE,
|
cairo_rectangle(cr,
|
||||||
6, 3 + ((segments - seg - 1) * 4),
|
6, 3 + ((segments - seg - 1) * 4),
|
||||||
segment_width,
|
segment_width,
|
||||||
3);
|
3);
|
||||||
if (stereo)
|
cairo_fill(cr);
|
||||||
gdk_draw_rectangle(pixmap[idx],
|
if (stereo) {
|
||||||
segs_on2 > 0 ? penOrangeLight[idx] : penOrangeShadow[idx],
|
gdk_cairo_set_source_rgba(cr,
|
||||||
TRUE,
|
segs_on2 > 0 ? penOrangeLight : penOrangeShadow);
|
||||||
2 + (width / 2),
|
cairo_rectangle(cr,
|
||||||
3 + ((segments - seg - 1) * 4),
|
2 + (width / 2),
|
||||||
segment_width,
|
3 + ((segments - seg - 1) * 4),
|
||||||
3);
|
segment_width,
|
||||||
|
3);
|
||||||
|
cairo_fill(cr);
|
||||||
|
}
|
||||||
segs_on1--;
|
segs_on1--;
|
||||||
segs_on2--;
|
segs_on2--;
|
||||||
}
|
}
|
||||||
for (seg = green_segments + orange_segments; seg < segments; seg++) {
|
for (; seg < segments && seg < end_seg; seg++) {
|
||||||
gdk_draw_rectangle(pixmap[idx],
|
gdk_cairo_set_source_rgba(cr,
|
||||||
segs_on1 > 0 ? penRedLight[idx] : penRedShadow[idx],
|
segs_on1 > 0 ? penRedLight : penRedShadow);
|
||||||
TRUE,
|
cairo_rectangle(cr,
|
||||||
6, 3 + ((segments - seg - 1) * 4),
|
6, 3 + ((segments - seg - 1) * 4),
|
||||||
segment_width,
|
segment_width,
|
||||||
3);
|
3);
|
||||||
if (stereo)
|
cairo_fill(cr);
|
||||||
gdk_draw_rectangle(pixmap[idx],
|
if (stereo) {
|
||||||
segs_on2 > 0 ? penRedLight[idx] : penRedShadow[idx],
|
gdk_cairo_set_source_rgba(cr,
|
||||||
TRUE,
|
segs_on2 > 0 ? penRedLight : penRedShadow);
|
||||||
2 + (width / 2),
|
cairo_rectangle(cr,
|
||||||
3 + ((segments - seg - 1) * 4),
|
2 + (width / 2),
|
||||||
segment_width,
|
3 + ((segments - seg - 1) * 4),
|
||||||
3);
|
segment_width,
|
||||||
|
3);
|
||||||
|
cairo_fill(cr);
|
||||||
|
}
|
||||||
segs_on1--;
|
segs_on1--;
|
||||||
segs_on2--;
|
segs_on2--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gint level_meters_configure_event(GtkWidget *widget, GdkEventConfigure *event)
|
gboolean level_meters_draw_callback(GtkWidget *widget, cairo_t *cr, gpointer data)
|
||||||
{
|
|
||||||
int idx = get_index(gtk_widget_get_name(widget));
|
|
||||||
|
|
||||||
if (pixmap[idx] != NULL)
|
|
||||||
gdk_pixmap_unref(pixmap[idx]);
|
|
||||||
pixmap[idx] = gdk_pixmap_new(widget->window,
|
|
||||||
widget->allocation.width,
|
|
||||||
widget->allocation.height,
|
|
||||||
-1);
|
|
||||||
penGreenShadow[idx] = get_pen(idx, 0, 0x77ff, 0);
|
|
||||||
penGreenLight[idx] = get_pen(idx, 0, 0xffff, 0);
|
|
||||||
penOrangeShadow[idx] = get_pen(idx, 0xddff, 0x55ff, 0);
|
|
||||||
penOrangeLight[idx] = get_pen(idx, 0xffff, 0x99ff, 0);
|
|
||||||
penRedShadow[idx] = get_pen(idx, 0xaaff, 0, 0);
|
|
||||||
penRedLight[idx] = get_pen(idx, 0xffff, 0, 0);
|
|
||||||
gdk_draw_rectangle(pixmap[idx],
|
|
||||||
widget->style->black_gc,
|
|
||||||
TRUE,
|
|
||||||
0, 0,
|
|
||||||
widget->allocation.width,
|
|
||||||
widget->allocation.height);
|
|
||||||
// g_print("configure: %i:%i\n", widget->allocation.width, widget->allocation.height);
|
|
||||||
redraw_meters(idx, widget->allocation.width, widget->allocation.height, 0, 0);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
gint level_meters_expose_event(GtkWidget *widget, GdkEventExpose *event)
|
|
||||||
{
|
{
|
||||||
int idx = get_index(gtk_widget_get_name(widget));
|
int idx = get_index(gtk_widget_get_name(widget));
|
||||||
int l1, l2;
|
int l1, l2;
|
||||||
|
|
||||||
get_levels(idx, &l1, &l2);
|
get_levels(idx, &l1, &l2);
|
||||||
redraw_meters(idx, widget->allocation.width, widget->allocation.height, l1, l2);
|
redraw_meters(idx, gtk_widget_get_allocated_width(widget), gtk_widget_get_allocated_height(widget), l1, l2, cr);
|
||||||
gdk_draw_pixmap(widget->window,
|
|
||||||
widget->style->black_gc,
|
|
||||||
pixmap[idx],
|
|
||||||
event->area.x, event->area.y,
|
|
||||||
event->area.x, event->area.y,
|
|
||||||
event->area.width, event->area.height);
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void update_meter(int idx)
|
||||||
|
{
|
||||||
|
int stereo = idx == 0;
|
||||||
|
GtkWidget *widget = stereo ? mixer_mix_drawing : mixer_drawing[idx - 1];
|
||||||
|
int width = gtk_widget_get_allocated_width(widget);
|
||||||
|
int height = gtk_widget_get_allocated_height(widget);
|
||||||
|
int segments = (height - 6) / 4;
|
||||||
|
int level_idx = stereo ? 20 : idx - 1;
|
||||||
|
int l1, l2, segs_on, old_segs_on, h;
|
||||||
|
|
||||||
|
get_levels(idx, &l1, &l2);
|
||||||
|
segs_on = ((segments * l1) + 128) / 255;
|
||||||
|
old_segs_on = ((segments * level[level_idx]) + 128) / 255;
|
||||||
|
h = abs(old_segs_on - segs_on);
|
||||||
|
level[level_idx] = l1;
|
||||||
|
|
||||||
|
if (h > 0) {
|
||||||
|
int y = segments - MAX(old_segs_on, segs_on);
|
||||||
|
gtk_widget_queue_draw_area(widget,
|
||||||
|
6, 4 * y + 3,
|
||||||
|
stereo ? (width / 2) - 8 : width - 12,
|
||||||
|
4 * h - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stereo) {
|
||||||
|
level_idx++;
|
||||||
|
segs_on = ((segments * l2) + 128) / 255;
|
||||||
|
old_segs_on = ((segments * level[level_idx]) + 128) / 255;
|
||||||
|
h = abs(old_segs_on - segs_on);
|
||||||
|
level[level_idx] = l2;
|
||||||
|
|
||||||
|
if (h > 0) {
|
||||||
|
int y = segments - MAX(old_segs_on, segs_on);
|
||||||
|
gtk_widget_queue_draw_area(widget,
|
||||||
|
2 + (width / 2), 4 * y + 3,
|
||||||
|
(width / 2) - 8,
|
||||||
|
4 * h - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
gint level_meters_timeout_callback(gpointer data)
|
gint level_meters_timeout_callback(gpointer data)
|
||||||
{
|
{
|
||||||
GtkWidget *widget;
|
int idx;
|
||||||
int idx, l1, l2;
|
|
||||||
|
|
||||||
update_peak_switch();
|
update_peak_switch();
|
||||||
for (idx = 0; idx <= pcm_output_channels; idx++) {
|
for (idx = 0; idx <= pcm_output_channels; idx++) {
|
||||||
get_levels(idx, &l1, &l2);
|
update_meter(idx);
|
||||||
widget = idx == 0 ? mixer_mix_drawing : mixer_drawing[idx-1];
|
|
||||||
if (GTK_WIDGET_VISIBLE(widget) && (pixmap[idx] != NULL)) {
|
|
||||||
redraw_meters(idx, widget->allocation.width, widget->allocation.height, l1, l2);
|
|
||||||
gdk_draw_pixmap(widget->window,
|
|
||||||
widget->style->black_gc,
|
|
||||||
pixmap[idx],
|
|
||||||
0, 0,
|
|
||||||
0, 0,
|
|
||||||
widget->allocation.width, widget->allocation.height);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (view_spdif_playback) {
|
if (view_spdif_playback) {
|
||||||
for (idx = MAX_PCM_OUTPUT_CHANNELS + 1; idx <= MAX_OUTPUT_CHANNELS + spdif_channels; idx++) {
|
for (idx = MAX_PCM_OUTPUT_CHANNELS + 1; idx <= MAX_OUTPUT_CHANNELS + spdif_channels; idx++) {
|
||||||
get_levels(idx, &l1, &l2);
|
update_meter(idx);
|
||||||
widget = idx == 0 ? mixer_mix_drawing : mixer_drawing[idx-1];
|
|
||||||
if (GTK_WIDGET_VISIBLE(widget) && (pixmap[idx] != NULL)) {
|
|
||||||
redraw_meters(idx, widget->allocation.width, widget->allocation.height, l1, l2);
|
|
||||||
gdk_draw_pixmap(widget->window,
|
|
||||||
widget->style->black_gc,
|
|
||||||
pixmap[idx],
|
|
||||||
0, 0,
|
|
||||||
0, 0,
|
|
||||||
widget->allocation.width, widget->allocation.height);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (idx = MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS + 1; idx <= input_channels + MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS; idx++) {
|
for (idx = MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS + 1; idx <= input_channels + MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS; idx++) {
|
||||||
get_levels(idx, &l1, &l2);
|
update_meter(idx);
|
||||||
widget = idx == 0 ? mixer_mix_drawing : mixer_drawing[idx-1];
|
|
||||||
if (GTK_WIDGET_VISIBLE(widget) && (pixmap[idx] != NULL)) {
|
|
||||||
redraw_meters(idx, widget->allocation.width, widget->allocation.height, l1, l2);
|
|
||||||
gdk_draw_pixmap(widget->window,
|
|
||||||
widget->style->black_gc,
|
|
||||||
pixmap[idx],
|
|
||||||
0, 0,
|
|
||||||
0, 0,
|
|
||||||
widget->allocation.width, widget->allocation.height);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for (idx = MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS + MAX_INPUT_CHANNELS + 1; \
|
for (idx = MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS + MAX_INPUT_CHANNELS + 1; \
|
||||||
idx <= spdif_channels + MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS + MAX_INPUT_CHANNELS; idx++) {
|
idx <= spdif_channels + MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS + MAX_INPUT_CHANNELS; idx++) {
|
||||||
get_levels(idx, &l1, &l2);
|
update_meter(idx);
|
||||||
widget = idx == 0 ? mixer_mix_drawing : mixer_drawing[idx-1];
|
|
||||||
if (GTK_WIDGET_VISIBLE(widget) && (pixmap[idx] != NULL)) {
|
|
||||||
redraw_meters(idx, widget->allocation.width, widget->allocation.height, l1, l2);
|
|
||||||
gdk_draw_pixmap(widget->window,
|
|
||||||
widget->style->black_gc,
|
|
||||||
pixmap[idx],
|
|
||||||
0, 0,
|
|
||||||
0, 0,
|
|
||||||
widget->allocation.width, widget->allocation.height);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
@ -270,6 +256,13 @@ void level_meters_init(void)
|
||||||
/* older ALSA driver, using MIXER type */
|
/* older ALSA driver, using MIXER type */
|
||||||
snd_ctl_elem_value_set_interface(peaks,
|
snd_ctl_elem_value_set_interface(peaks,
|
||||||
SND_CTL_ELEM_IFACE_MIXER);
|
SND_CTL_ELEM_IFACE_MIXER);
|
||||||
|
|
||||||
|
penGreenShadow = get_pen(0, 0x77ff, 0);
|
||||||
|
penGreenLight = get_pen(0, 0xffff, 0);
|
||||||
|
penOrangeShadow = get_pen(0xddff, 0x55ff, 0);
|
||||||
|
penOrangeLight = get_pen(0xffff, 0x99ff, 0);
|
||||||
|
penRedShadow = get_pen(0xaaff, 0, 0);
|
||||||
|
penRedLight = get_pen(0xffff, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void level_meters_postinit(void)
|
void level_meters_postinit(void)
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
@ -243,7 +243,7 @@ int midi_init(char *appname, int channel, int midi_enhanced)
|
||||||
void mixer_adjust(GtkAdjustment *adj, gpointer data);
|
void mixer_adjust(GtkAdjustment *adj, gpointer data);
|
||||||
void mixer_set_mute(int stream, int left, int right);
|
void mixer_set_mute(int stream, int left, int right);
|
||||||
|
|
||||||
void midi_process(gpointer data, gint source, GdkInputCondition condition)
|
gboolean midi_process(GIOChannel *gio, GIOCondition condition, gpointer data)
|
||||||
{
|
{
|
||||||
snd_seq_event_t *ev;
|
snd_seq_event_t *ev;
|
||||||
static GtkAdjustment *adj=0;
|
static GtkAdjustment *adj=0;
|
||||||
|
|
@ -306,6 +306,7 @@ void midi_process(gpointer data, gint source, GdkInputCondition condition)
|
||||||
snd_seq_free_event(ev);
|
snd_seq_free_event(ev);
|
||||||
}
|
}
|
||||||
while (snd_seq_event_input_pending(seq, 0) > 0);
|
while (snd_seq_event_input_pending(seq, 0) > 0);
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************* */
|
/* ************************************************* */
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ int midi_init(char *appname, int channel, int midi_enhanced);
|
||||||
int midi_close();
|
int midi_close();
|
||||||
void midi_maxstreams(int);
|
void midi_maxstreams(int);
|
||||||
int midi_controller(int c, int v);
|
int midi_controller(int c, int v);
|
||||||
void midi_process(gpointer data, gint source, GdkInputCondition condition);
|
gboolean midi_process(GIOChannel *gio, GIOCondition condition, gpointer data);
|
||||||
int midi_button(int b, int v);
|
int midi_button(int b, int v);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include "envy24control.h"
|
#include "envy24control.h"
|
||||||
|
|
@ -39,7 +39,7 @@ extern int input_channels, output_channels, pcm_output_channels, spdif_channels,
|
||||||
|
|
||||||
static int is_active(GtkWidget *widget)
|
static int is_active(GtkWidget *widget)
|
||||||
{
|
{
|
||||||
return GTK_TOGGLE_BUTTON(widget)->active ? 1 : 0;
|
return gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mixer_update_stream(int stream, int vol_flag, int sw_flag)
|
void mixer_update_stream(int stream, int vol_flag, int sw_flag)
|
||||||
|
|
@ -181,10 +181,10 @@ void mixer_adjust(GtkAdjustment *adj, gpointer data)
|
||||||
int stereo = is_active(mixer_stereo_toggle[stream-1]) ? 1 : 0;
|
int stereo = is_active(mixer_stereo_toggle[stream-1]) ? 1 : 0;
|
||||||
int vol[2] = { -1, -1 };
|
int vol[2] = { -1, -1 };
|
||||||
|
|
||||||
vol[button] = 96 - adj->value;
|
vol[button] = 96 - gtk_adjustment_get_value(adj);
|
||||||
if (stereo) {
|
if (stereo) {
|
||||||
gtk_adjustment_set_value(GTK_ADJUSTMENT(mixer_adj[stream-1][button ^ 1]), adj->value);
|
gtk_adjustment_set_value(GTK_ADJUSTMENT(mixer_adj[stream-1][button ^ 1]), gtk_adjustment_get_value(adj));
|
||||||
vol[button ^ 1] = 96 - adj->value;
|
vol[button ^ 1] = 96 - gtk_adjustment_get_value(adj);
|
||||||
}
|
}
|
||||||
set_volume1(stream, vol[0], vol[1]);
|
set_volume1(stream, vol[0], vol[1]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,9 @@ int new_process(char * const cmd_line[MAX_PARAM])
|
||||||
struct stat file_status;
|
struct stat file_status;
|
||||||
|
|
||||||
/* memory for storage of function pointers from the signal handling routines */
|
/* memory for storage of function pointers from the signal handling routines */
|
||||||
void (*int_stat)();
|
void (*int_stat)(int);
|
||||||
void (*quit_stat)();
|
void (*quit_stat)(int);
|
||||||
void (*usr2_stat)();
|
void (*usr2_stat)(int);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* check command file
|
* check command file
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include "envy24control.h"
|
#include "envy24control.h"
|
||||||
|
|
@ -30,7 +30,7 @@ extern int output_channels, input_channels, pcm_output_channels, spdif_channels;
|
||||||
|
|
||||||
static int is_active(GtkWidget *widget)
|
static int is_active(GtkWidget *widget)
|
||||||
{
|
{
|
||||||
return GTK_TOGGLE_BUTTON(widget)->active ? 1 : 0;
|
return gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_toggle_index(int stream)
|
static int get_toggle_index(int stream)
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -54,9 +54,9 @@ void subst_tilde_in_filename(char * const filename)
|
||||||
|
|
||||||
if ((pos_after_tilde = strchr(filename, '~')) != NULL) {
|
if ((pos_after_tilde = strchr(filename, '~')) != NULL) {
|
||||||
pos_after_tilde++;
|
pos_after_tilde++;
|
||||||
strncpy(new_filename, getenv("HOME"), MAX_FILE_NAME_LENGTH);
|
strncpy(new_filename, getenv("HOME"), sizeof(new_filename) - 1);
|
||||||
strncpy(new_filename + strlen(new_filename), pos_after_tilde, MAX_FILE_NAME_LENGTH - strlen(new_filename));
|
strncpy(new_filename + strlen(new_filename), pos_after_tilde, sizeof(new_filename) - strlen(new_filename) - 1);
|
||||||
new_filename[MAX_FILE_NAME_LENGTH - 1] = '\0';
|
new_filename[sizeof(new_filename) - 1] = '\0';
|
||||||
strncpy(filename, new_filename, MAX_FILE_NAME_LENGTH);
|
strncpy(filename, new_filename, MAX_FILE_NAME_LENGTH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -78,7 +78,9 @@ int which_cfgfile(char ** const cfgfile)
|
||||||
(inputFile = fopen(SYS_PROFILERC, "r")) == NULL) {
|
(inputFile = fopen(SYS_PROFILERC, "r")) == NULL) {
|
||||||
res = -ENOENT;
|
res = -ENOENT;
|
||||||
} else {
|
} else {
|
||||||
fclose(inputFile);
|
if (inputFile != NULL) {
|
||||||
|
fclose(inputFile);
|
||||||
|
}
|
||||||
*cfgfile = SYS_PROFILERC;
|
*cfgfile = SYS_PROFILERC;
|
||||||
res = EXIT_SUCCESS;
|
res = EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
@ -94,7 +96,9 @@ int get_file_size(const char * const filename)
|
||||||
{
|
{
|
||||||
struct stat file_status;
|
struct stat file_status;
|
||||||
|
|
||||||
strncpy(filename_without_tilde, filename, MAX_FILE_NAME_LENGTH);
|
if (filename_without_tilde != filename) {
|
||||||
|
strncpy(filename_without_tilde, filename, MAX_FILE_NAME_LENGTH);
|
||||||
|
}
|
||||||
filename_without_tilde[MAX_FILE_NAME_LENGTH - 1] = '\0';
|
filename_without_tilde[MAX_FILE_NAME_LENGTH - 1] = '\0';
|
||||||
subst_tilde_in_filename(filename_without_tilde);
|
subst_tilde_in_filename(filename_without_tilde);
|
||||||
if (stat(filename_without_tilde, &file_status) < 0) {
|
if (stat(filename_without_tilde, &file_status) < 0) {
|
||||||
|
|
@ -470,7 +474,8 @@ int get_pos_name_header_from_card(const char * const buffer, const int profile_n
|
||||||
char place_holder;
|
char place_holder;
|
||||||
int pos_card_begin, pos_card_end, pos_name_header;
|
int pos_card_begin, pos_card_end, pos_name_header;
|
||||||
|
|
||||||
pos_card_begin = get_card_begin(buffer, profile_number, card_number);
|
if ((pos_card_begin = get_card_begin(buffer, profile_number, card_number)) < 0)
|
||||||
|
return pos_card_begin;
|
||||||
pos_card_end = get_card_end(buffer, profile_number, card_number);
|
pos_card_end = get_card_end(buffer, profile_number, card_number);
|
||||||
place_holder = PLACE_HOLDER_STR;
|
place_holder = PLACE_HOLDER_STR;
|
||||||
strncpy(header, PROFILE_NAME_TEMPL, MAX_SEARCH_FIELD_LENGTH);
|
strncpy(header, PROFILE_NAME_TEMPL, MAX_SEARCH_FIELD_LENGTH);
|
||||||
|
|
@ -522,7 +527,7 @@ int reorganize_profiles(char * const buffer, const int max_length)
|
||||||
{
|
{
|
||||||
int profile_number, card_number, card_number_max;
|
int profile_number, card_number, card_number_max;
|
||||||
int res;
|
int res;
|
||||||
int pos_profile_begin, pos_profile_end, pos_card_begin, pos_card_end, pos_name_header;
|
int pos_profile_begin, pos_card_begin, pos_card_end, pos_name_header;
|
||||||
int pos_alsa_section_begin, pos_after_alsa_section;
|
int pos_alsa_section_begin, pos_after_alsa_section;
|
||||||
char header[MAX_SEARCH_FIELD_LENGTH];
|
char header[MAX_SEARCH_FIELD_LENGTH];
|
||||||
void *buffer_copy = NULL;
|
void *buffer_copy = NULL;
|
||||||
|
|
@ -547,7 +552,6 @@ int reorganize_profiles(char * const buffer, const int max_length)
|
||||||
compose_search_string(header, PROFILE_HEADER_TEMPL, profile_or_card_number_as_str, place_holder, MAX_SEARCH_FIELD_LENGTH);
|
compose_search_string(header, PROFILE_HEADER_TEMPL, profile_or_card_number_as_str, place_holder, MAX_SEARCH_FIELD_LENGTH);
|
||||||
header[MAX_SEARCH_FIELD_LENGTH - 1] = '\0';
|
header[MAX_SEARCH_FIELD_LENGTH - 1] = '\0';
|
||||||
snprintf(buffer_copy + strlen(buffer_copy), max_length - strlen(buffer_copy), "%s\n", header);
|
snprintf(buffer_copy + strlen(buffer_copy), max_length - strlen(buffer_copy), "%s\n", header);
|
||||||
pos_profile_end = get_profile_end(buffer, profile_number);
|
|
||||||
/* search max card number in profile */
|
/* search max card number in profile */
|
||||||
card_number_max = get_max_card_number_in_profile(buffer, profile_number);
|
card_number_max = get_max_card_number_in_profile(buffer, profile_number);
|
||||||
for (card_number = 0; card_number <= card_number_max; card_number++)
|
for (card_number = 0; card_number <= card_number_max; card_number++)
|
||||||
|
|
@ -641,9 +645,9 @@ int save_restore_alsactl_settings(char * const tmpfile, const int card_number, c
|
||||||
|
|
||||||
void compose_tmpfile_name(char * const tmpfile, const char * const cfgfile)
|
void compose_tmpfile_name(char * const tmpfile, const char * const cfgfile)
|
||||||
{
|
{
|
||||||
strncpy(tmpfile, cfgfile, MAX_FILE_NAME_LENGTH);
|
strncpy(tmpfile, cfgfile, MAX_FILE_NAME_LENGTH - 1);
|
||||||
tmpfile[MAX_FILE_NAME_LENGTH - 1] = '\0';
|
tmpfile[MAX_FILE_NAME_LENGTH - 1] = '\0';
|
||||||
strncpy(tmpfile + strlen(tmpfile), "_alsactl_tmp", MAX_FILE_NAME_LENGTH - strlen(tmpfile));
|
strncpy(tmpfile + strlen(tmpfile), "_alsactl_tmp", MAX_FILE_NAME_LENGTH - strlen(tmpfile) - 1);
|
||||||
tmpfile[MAX_FILE_NAME_LENGTH - 1] = '\0';
|
tmpfile[MAX_FILE_NAME_LENGTH - 1] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1145,13 +1149,16 @@ int save_restore(const char * const operation, const int profile_number, const i
|
||||||
fprintf(stderr, "Cannot save settings for card '%d' in profile '%d'.\n", card_number, profile_number);
|
fprintf(stderr, "Cannot save settings for card '%d' in profile '%d'.\n", card_number, profile_number);
|
||||||
return -errno;
|
return -errno;
|
||||||
}
|
}
|
||||||
|
close(res);
|
||||||
unlink(cfgfile);
|
unlink(cfgfile);
|
||||||
} else {
|
} else {
|
||||||
|
close(res);
|
||||||
if ((res = open(cfgfile, O_RDWR | 0400000 /* O_NOFOLLOW */, FILE_CREA_MODE)) < 0) {
|
if ((res = open(cfgfile, O_RDWR | 0400000 /* O_NOFOLLOW */, FILE_CREA_MODE)) < 0) {
|
||||||
fprintf(stderr, "Cannot open configuration file '%s' for writing.\n", cfgfile);
|
fprintf(stderr, "Cannot open configuration file '%s' for writing.\n", cfgfile);
|
||||||
fprintf(stderr, "Cannot save settings for card '%d' in profile '%d'.\n", card_number, profile_number);
|
fprintf(stderr, "Cannot save settings for card '%d' in profile '%d'.\n", card_number, profile_number);
|
||||||
return -errno;
|
return -errno;
|
||||||
}
|
}
|
||||||
|
close(res);
|
||||||
}
|
}
|
||||||
res = save_profile(profile_number, card_number, profile_name, cfgfile);
|
res = save_profile(profile_number, card_number, profile_name, cfgfile);
|
||||||
} else if (!strcmp(operation, ALSACTL_OP_RESTORE)) {
|
} else if (!strcmp(operation, ALSACTL_OP_RESTORE)) {
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
#define MAX_PROFILE_SIZE 32768
|
#define MAX_PROFILE_SIZE 32768
|
||||||
#define MAX_SEARCH_FIELD_LENGTH 1024
|
#define MAX_SEARCH_FIELD_LENGTH 1024
|
||||||
#define MAX_FILE_NAME_LENGTH 1024
|
#define MAX_FILE_NAME_LENGTH 1024
|
||||||
#define MAX_NUM_STR_LENGTH 10
|
#define MAX_NUM_STR_LENGTH 11
|
||||||
#define TOKEN_SEP "|"
|
#define TOKEN_SEP "|"
|
||||||
#define SEP_CHAR ' '
|
#define SEP_CHAR ' '
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -48,6 +48,7 @@ int strstr_icase_blank(const char * const string1, const char * const string2)
|
||||||
char search_string[MAX_SEARCH_FIELD_LENGTH];
|
char search_string[MAX_SEARCH_FIELD_LENGTH];
|
||||||
char *pstr;
|
char *pstr;
|
||||||
int pos_first_non_blank;
|
int pos_first_non_blank;
|
||||||
|
size_t len;
|
||||||
|
|
||||||
strncpy(search_string, string2, MAX_SEARCH_FIELD_LENGTH);
|
strncpy(search_string, string2, MAX_SEARCH_FIELD_LENGTH);
|
||||||
search_string[MAX_SEARCH_FIELD_LENGTH - 1] = '\0';
|
search_string[MAX_SEARCH_FIELD_LENGTH - 1] = '\0';
|
||||||
|
|
@ -84,7 +85,11 @@ int strstr_icase_blank(const char * const string1, const char * const string2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
strncpy(search_string, cmp_line, strlen(search_string));
|
len = strlen(search_string);
|
||||||
|
if (len > sizeof(search_string) - 1)
|
||||||
|
len = sizeof(search_string) - 1;
|
||||||
|
strncpy(search_string, cmp_line, len);
|
||||||
|
search_string[len] = '\0';
|
||||||
|
|
||||||
position = 0;
|
position = 0;
|
||||||
while (position < strlen(string1))
|
while (position < strlen(string1))
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "envy24control.h"
|
#include "envy24control.h"
|
||||||
|
|
@ -217,7 +217,7 @@ void dac_volume_adjust(GtkAdjustment *adj, gpointer data)
|
||||||
{
|
{
|
||||||
int idx = (int)(long)data;
|
int idx = (int)(long)data;
|
||||||
snd_ctl_elem_value_t *val;
|
snd_ctl_elem_value_t *val;
|
||||||
int err, ival = -(int)adj->value;
|
int err, ival = -(int)gtk_adjustment_get_value(adj);
|
||||||
char text[16];
|
char text[16];
|
||||||
|
|
||||||
snd_ctl_elem_value_alloca(&val);
|
snd_ctl_elem_value_alloca(&val);
|
||||||
|
|
@ -235,7 +235,7 @@ void adc_volume_adjust(GtkAdjustment *adj, gpointer data)
|
||||||
{
|
{
|
||||||
int idx = (int)(long)data;
|
int idx = (int)(long)data;
|
||||||
snd_ctl_elem_value_t *val;
|
snd_ctl_elem_value_t *val;
|
||||||
int err, ival = -(int)adj->value;
|
int err, ival = -(int)gtk_adjustment_get_value(adj);
|
||||||
char text[16];
|
char text[16];
|
||||||
|
|
||||||
snd_ctl_elem_value_alloca(&val);
|
snd_ctl_elem_value_alloca(&val);
|
||||||
|
|
@ -253,7 +253,7 @@ void ipga_volume_adjust(GtkAdjustment *adj, gpointer data)
|
||||||
{
|
{
|
||||||
int idx = (int)(long)data;
|
int idx = (int)(long)data;
|
||||||
snd_ctl_elem_value_t *val;
|
snd_ctl_elem_value_t *val;
|
||||||
int err, ival = -(int)adj->value;
|
int err, ival = -(int)gtk_adjustment_get_value(adj);
|
||||||
char text[16];
|
char text[16];
|
||||||
|
|
||||||
snd_ctl_elem_value_alloca(&val);
|
snd_ctl_elem_value_alloca(&val);
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __SOUND_HDA_HWDEP_H
|
#ifndef __SOUND_HDA_HWDEP_H
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
SUBDIRS = desktop
|
||||||
EXTRA_DIST = gitcompile README
|
EXTRA_DIST = gitcompile README
|
||||||
AM_CFLAGS = @GTK3_CFLAGS@ -Wno-deprecated-declarations
|
AM_CFLAGS = @GTK3_CFLAGS@ -Wno-deprecated-declarations
|
||||||
bin_PROGRAMS = hdajackretask
|
bin_PROGRAMS = hdajackretask
|
||||||
|
|
@ -21,4 +22,3 @@ alsa-dist: distdir
|
||||||
@mkdir -p ../distdir/hdajackretask
|
@mkdir -p ../distdir/hdajackretask
|
||||||
@cp -RLpv $(distdir)/* ../distdir/hdajackretask
|
@cp -RLpv $(distdir)/* ../distdir/hdajackretask
|
||||||
@rm -rf $(distdir)
|
@rm -rf $(distdir)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,4 +51,4 @@ This is for the experts only. It makes you select each configuration field indiv
|
||||||
http://www.intel.com/content/dam/www/public/us/en/documents/product-specifications/high-definition-audio-specification.pdf )
|
http://www.intel.com/content/dam/www/public/us/en/documents/product-specifications/high-definition-audio-specification.pdf )
|
||||||
|
|
||||||
* Parser hints
|
* Parser hints
|
||||||
This enables you to send special "hints" to the driver that causes parsing to behave differently. Leave them at the "default" setting unless you have read the driver documentation. ( Which, at the time of this writing, is available here: https://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio.txt - see the "Hint strings" section. )
|
This enables you to send special "hints" to the driver that causes parsing to behave differently. Leave them at the "default" setting unless you have read the driver documentation. ( Which, at the time of this writing, is available here: https://www.kernel.org/doc/Documentation/sound/hd-audio/notes.rst - see the "Hint strings" section. )
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,15 @@ static gchar* tempdir = NULL;
|
||||||
static gchar* scriptfile = NULL;
|
static gchar* scriptfile = NULL;
|
||||||
static gchar* errorfile = NULL;
|
static gchar* errorfile = NULL;
|
||||||
|
|
||||||
|
struct soundserver {
|
||||||
|
enum {
|
||||||
|
PULSEAUDIO,
|
||||||
|
PIPEWIRE
|
||||||
|
} type;
|
||||||
|
gboolean was_killed;
|
||||||
|
gchar *user;
|
||||||
|
};
|
||||||
|
|
||||||
static GQuark quark()
|
static GQuark quark()
|
||||||
{
|
{
|
||||||
return g_quark_from_static_string("hda-jack-retask-error");
|
return g_quark_from_static_string("hda-jack-retask-error");
|
||||||
|
|
@ -125,33 +134,73 @@ static gchar* get_pulseaudio_client_conf()
|
||||||
return fname;
|
return fname;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean kill_pulseaudio(gboolean* was_killed, int card, GError** err)
|
static gboolean call_systemctl(gchar* user, gchar* operation, gchar *unit, GError **err)
|
||||||
|
{
|
||||||
|
gchar* s;
|
||||||
|
gboolean ok;
|
||||||
|
|
||||||
|
if (getuid() == 0) {
|
||||||
|
// special case for root
|
||||||
|
// XDG_RUNTIME_DIR setup seems to be mandatory for Fedora, may differ for other distros
|
||||||
|
s = g_strdup_printf("runuser -l %s -c 'XDG_RUNTIME_DIR=/var/run/user/$(id -u) systemctl --user %s %s'", user, operation, unit);
|
||||||
|
} else {
|
||||||
|
s = g_strdup_printf("systemctl --user %s %s", operation, unit);
|
||||||
|
}
|
||||||
|
ok = g_spawn_command_line_sync(s, NULL, NULL, NULL, err);
|
||||||
|
g_free(s);
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean kill_soundserver(struct soundserver* state, int card, GError** err)
|
||||||
{
|
{
|
||||||
gchar* fuser = NULL, *fuser2 = NULL;
|
gchar* fuser = NULL, *fuser2 = NULL;
|
||||||
gchar* s = NULL;
|
gchar* s = NULL;
|
||||||
gchar* clientconf = NULL;
|
gchar* clientconf = NULL;
|
||||||
gboolean ok;
|
gboolean ok;
|
||||||
*was_killed = FALSE;
|
char *p;
|
||||||
|
state->type = PULSEAUDIO;
|
||||||
|
state->was_killed = FALSE;
|
||||||
|
state->user = NULL;
|
||||||
/* Is PA having a lock on the sound card? */
|
/* Is PA having a lock on the sound card? */
|
||||||
s = g_strdup_printf("fuser -v /dev/snd/controlC%d", card);
|
s = g_strdup_printf("fuser -v /dev/snd/controlC%d", card);
|
||||||
/* Due to some bug in fuser, stdout and stderr output is unclear. Better check both. */
|
/* Due to some bug in fuser, stdout and stderr output is unclear. Better check both. */
|
||||||
if (!(ok = g_spawn_command_line_sync(s, &fuser, &fuser2, NULL, err)))
|
if (!(ok = g_spawn_command_line_sync(s, &fuser, &fuser2, NULL, err)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if ((ok = strstr(fuser, "pulseaudio") == NULL && strstr(fuser2, "pulseaudio") == NULL))
|
if (strstr(fuser, "pulseaudio") != NULL || strstr(fuser2, "pulseaudio") != NULL) {
|
||||||
goto cleanup; // PulseAudio not locking the sound card
|
clientconf = get_pulseaudio_client_conf();
|
||||||
|
if (!(ok = !g_file_test(clientconf, G_FILE_TEST_EXISTS))) {
|
||||||
|
g_set_error(err, quark(), 0, "Cannot block PulseAudio from respawning:\n"
|
||||||
|
"Please either remove '%s' or kill PulseAudio manually.", clientconf);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(ok = g_file_set_contents(clientconf, "autospawn=no\n", -1, err)))
|
||||||
|
goto cleanup;
|
||||||
|
state->was_killed = TRUE;
|
||||||
|
ok = g_spawn_command_line_sync("pulseaudio -k", NULL, NULL, NULL, err);
|
||||||
|
} else if ((p = strstr(fuser, "wireplumber")) != NULL || (p = strstr(fuser2, "wireplumber")) != NULL) {
|
||||||
|
*p = '\0';
|
||||||
|
while (p != fuser && p != fuser2 && *p != '\n')
|
||||||
|
p--;
|
||||||
|
if (*p == '\n')
|
||||||
|
p++;
|
||||||
|
|
||||||
|
GRegex *regex;
|
||||||
|
GMatchInfo *match_info;
|
||||||
|
|
||||||
clientconf = get_pulseaudio_client_conf();
|
regex = g_regex_new (" ([a-zA-Z0-9_-]+) ", G_REGEX_DEFAULT, G_REGEX_MATCH_DEFAULT, NULL);
|
||||||
if (!(ok = !g_file_test(clientconf, G_FILE_TEST_EXISTS))) {
|
g_regex_match (regex, p, 0, &match_info);
|
||||||
g_set_error(err, quark(), 0, "Cannot block PulseAudio from respawning:\n"
|
if (g_match_info_matches (match_info))
|
||||||
"Please either remove '%s' or kill PulseAudio manually.", clientconf);
|
state->user = g_match_info_fetch (match_info, 1);
|
||||||
goto cleanup;
|
g_match_info_free (match_info);
|
||||||
|
g_regex_unref (regex);
|
||||||
|
|
||||||
|
state->type = PIPEWIRE;
|
||||||
|
ok = call_systemctl(state->user, "stop", "wireplumber.service", err);
|
||||||
|
state->was_killed = ok;
|
||||||
|
} else {
|
||||||
|
// Sound server not locking the sound card
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(ok = g_file_set_contents(clientconf, "autospawn=no\n", -1, err)))
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
*was_killed = TRUE;
|
|
||||||
ok = g_spawn_command_line_sync("pulseaudio -k", NULL, NULL, NULL, err);
|
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
g_free(clientconf);
|
g_free(clientconf);
|
||||||
|
|
@ -161,16 +210,34 @@ cleanup:
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean restore_pulseaudio(gboolean was_killed, GError** err)
|
static gboolean restore_soundserver(struct soundserver* state, GError** err)
|
||||||
{
|
{
|
||||||
gchar* clientconf = get_pulseaudio_client_conf();
|
gboolean ok = FALSE;
|
||||||
if (was_killed && g_unlink(clientconf) != 0) {
|
gchar* clientconf;
|
||||||
g_set_error(err, quark(), 0, "%s", g_strerror(errno));
|
|
||||||
g_free(clientconf);
|
switch (state->type) {
|
||||||
return FALSE;
|
case PULSEAUDIO:
|
||||||
|
clientconf = get_pulseaudio_client_conf();
|
||||||
|
if (state->was_killed && g_unlink(clientconf) != 0) {
|
||||||
|
g_set_error(err, quark(), 0, "%s", g_strerror(errno));
|
||||||
|
g_free(clientconf);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
g_free(clientconf);
|
||||||
|
ok = TRUE;
|
||||||
|
break;
|
||||||
|
case PIPEWIRE:
|
||||||
|
if (state->was_killed)
|
||||||
|
ok = call_systemctl(state->user, "start", "wireplumber.service", err);
|
||||||
|
else
|
||||||
|
ok = TRUE;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
g_free(clientconf);
|
|
||||||
return TRUE;
|
cleanup:
|
||||||
|
g_free(state->user);
|
||||||
|
state->user = NULL;
|
||||||
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean apply_changes_reconfig(pin_configs_t* pins, int entries, int card, int device,
|
gboolean apply_changes_reconfig(pin_configs_t* pins, int entries, int card, int device,
|
||||||
|
|
@ -178,10 +245,10 @@ gboolean apply_changes_reconfig(pin_configs_t* pins, int entries, int card, int
|
||||||
{
|
{
|
||||||
gboolean result = FALSE;
|
gboolean result = FALSE;
|
||||||
// gchar* script_name = NULL;
|
// gchar* script_name = NULL;
|
||||||
gboolean pa_killed = FALSE;
|
struct soundserver state = { 0 };
|
||||||
/* Check for users of the sound card */
|
/* Check for users of the sound card */
|
||||||
/* Kill pulseaudio if necessary (and possible) */
|
/* Kill pulseaudio if necessary (and possible) */
|
||||||
if (!kill_pulseaudio(&pa_killed, card, err))
|
if (!kill_soundserver(&state, card, err))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
/* Create script */
|
/* Create script */
|
||||||
if (!create_reconfig_script(pins, entries, card, device, model, hints, err))
|
if (!create_reconfig_script(pins, entries, card, device, model, hints, err))
|
||||||
|
|
@ -191,7 +258,7 @@ gboolean apply_changes_reconfig(pin_configs_t* pins, int entries, int card, int
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
cleanup:
|
cleanup:
|
||||||
if (!restore_pulseaudio(pa_killed, result ? err : NULL)) {
|
if (!restore_soundserver(&state, result ? err : NULL)) {
|
||||||
result = FALSE;
|
result = FALSE;
|
||||||
}
|
}
|
||||||
// g_free(script_name);
|
// g_free(script_name);
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ gboolean apply_changes_reconfig(pin_configs_t* pins, int entries, int card, int
|
||||||
|
|
||||||
gboolean apply_changes_boot(pin_configs_t* pins, int entries, int card, int device,
|
gboolean apply_changes_boot(pin_configs_t* pins, int entries, int card, int device,
|
||||||
const char* model, const char* hints, GError** err);
|
const char* model, const char* hints, GError** err);
|
||||||
gboolean reset_changes_boot();
|
gboolean reset_changes_boot(GError ** err);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,4 @@ AC_HEADER_STDC
|
||||||
|
|
||||||
PKG_CHECK_MODULES(GTK3, gtk+-3.0)
|
PKG_CHECK_MODULES(GTK3, gtk+-3.0)
|
||||||
|
|
||||||
AC_OUTPUT(Makefile)
|
AC_OUTPUT(Makefile desktop/Makefile)
|
||||||
|
|
|
||||||
36
hdajackretask/desktop/Makefile.am
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
APPNAME = hdajackretask
|
||||||
|
|
||||||
|
desktopdir = $(datadir)/applications
|
||||||
|
desktop_DATA = $(APPNAME).desktop
|
||||||
|
|
||||||
|
public_icons = \
|
||||||
|
hicolor_apps_48x48_$(APPNAME).png \
|
||||||
|
hicolor_apps_128x128_$(APPNAME).png \
|
||||||
|
hicolor_apps_256x256_$(APPNAME).png
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
$(public_icons) \
|
||||||
|
$(desktop_DATA)
|
||||||
|
|
||||||
|
install-icons:
|
||||||
|
for icon in $(public_icons); do \
|
||||||
|
THEME=`echo $$icon | cut -d_ -f1`; \
|
||||||
|
CONTEXT=`echo $$icon | cut -d_ -f2`; \
|
||||||
|
SIZE=`echo $$icon | cut -d_ -f3`; \
|
||||||
|
ICONFILE=`echo $$icon | cut -d_ -f4`; \
|
||||||
|
mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
|
||||||
|
$(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-icons:
|
||||||
|
-for icon in $(public_icons); do \
|
||||||
|
THEME=`echo $$icon | cut -d_ -f1`; \
|
||||||
|
CONTEXT=`echo $$icon | cut -d_ -f2`; \
|
||||||
|
SIZE=`echo $$icon | cut -d_ -f3`; \
|
||||||
|
ICONFILE=`echo $$icon | cut -d_ -f4`; \
|
||||||
|
rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
|
||||||
|
done
|
||||||
|
|
||||||
|
install-data-local: install-icons
|
||||||
|
|
||||||
|
uninstall-local: uninstall-icons
|
||||||
8
hdajackretask/desktop/hdajackretask.desktop
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=HDAJackRetask
|
||||||
|
GenericName=Retask the audio jacks for the HDA sound driver
|
||||||
|
Exec=hdajackretask
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=AudioVideo;
|
||||||
|
Version=0.9.4
|
||||||
BIN
hdajackretask/desktop/hicolor_apps_128x128_hdajackretask.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
hdajackretask/desktop/hicolor_apps_256x256_hdajackretask.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
hdajackretask/desktop/hicolor_apps_48x48_hdajackretask.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
|
|
@ -519,7 +519,7 @@ static void documentation_clicked(GtkWidget* sender, ui_data_t* ui)
|
||||||
int neww = screen ? (gdk_screen_get_width(screen)*3)/4 : 800;
|
int neww = screen ? (gdk_screen_get_width(screen)*3)/4 : 800;
|
||||||
int newh = screen ? (gdk_screen_get_height(screen)*3)/4 : 600;
|
int newh = screen ? (gdk_screen_get_height(screen)*3)/4 : 600;
|
||||||
|
|
||||||
gtk_window_set_default_size(GTK_WINDOW(dlg), neww, newh);
|
gtk_window_set_default_size(GTK_WINDOW(dlg), MIN(1600, neww), MIN(1000, newh));
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_dialog_run(dlg);
|
gtk_dialog_run(dlg);
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
EXTRA_DIST = gitcompile
|
||||||
MYNAME = hdajacksensetest
|
MYNAME = hdajacksensetest
|
||||||
AUTOMAKE_OPTIONS = foreign
|
AUTOMAKE_OPTIONS = foreign
|
||||||
bin_PROGRAMS = hdajacksensetest
|
bin_PROGRAMS = hdajacksensetest
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
EXTRA_DIST = gitcompile hdspconf.desktop depcomp
|
EXTRA_DIST = gitcompile depcomp
|
||||||
SUBDIRS = src pixmaps
|
SUBDIRS = src pixmaps desktop
|
||||||
|
|
||||||
desktopdir = $(DESKTOP_DIR)
|
|
||||||
desktop_DATA = hdspconf.desktop
|
|
||||||
|
|
||||||
alsa-dist: distdir
|
alsa-dist: distdir
|
||||||
@rm -rf ../distdir/hdspconf
|
@rm -rf ../distdir/hdspconf
|
||||||
|
|
|
||||||
|
|
@ -39,4 +39,4 @@ FLTK_LIBS=`$FLTK_CONFIG $fltk_config_args --ldflags`
|
||||||
CXXFLAGS="$CXXFLAGS $ALSA_CFLAGS $FLTK_CXXFLAGS"
|
CXXFLAGS="$CXXFLAGS $ALSA_CFLAGS $FLTK_CXXFLAGS"
|
||||||
LIBS="$LIBS $ALSA_LIBS $FLTK_LIBS"
|
LIBS="$LIBS $ALSA_LIBS $FLTK_LIBS"
|
||||||
|
|
||||||
AC_OUTPUT(Makefile src/Makefile pixmaps/Makefile)
|
AC_OUTPUT(Makefile src/Makefile pixmaps/Makefile desktop/Makefile)
|
||||||
|
|
|
||||||
34
hdspconf/desktop/Makefile.am
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
APPNAME = hdspconf
|
||||||
|
|
||||||
|
desktopdir = $(datadir)/applications
|
||||||
|
desktop_DATA = $(APPNAME).desktop
|
||||||
|
|
||||||
|
public_icons = \
|
||||||
|
hicolor_apps_48x48_$(APPNAME).png
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
$(public_icons) \
|
||||||
|
$(desktop_DATA)
|
||||||
|
|
||||||
|
install-icons:
|
||||||
|
for icon in $(public_icons); do \
|
||||||
|
THEME=`echo $$icon | cut -d_ -f1`; \
|
||||||
|
CONTEXT=`echo $$icon | cut -d_ -f2`; \
|
||||||
|
SIZE=`echo $$icon | cut -d_ -f3`; \
|
||||||
|
ICONFILE=`echo $$icon | cut -d_ -f4`; \
|
||||||
|
mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
|
||||||
|
$(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-icons:
|
||||||
|
-for icon in $(public_icons); do \
|
||||||
|
THEME=`echo $$icon | cut -d_ -f1`; \
|
||||||
|
CONTEXT=`echo $$icon | cut -d_ -f2`; \
|
||||||
|
SIZE=`echo $$icon | cut -d_ -f3`; \
|
||||||
|
ICONFILE=`echo $$icon | cut -d_ -f4`; \
|
||||||
|
rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
|
||||||
|
done
|
||||||
|
|
||||||
|
install-data-local: install-icons
|
||||||
|
|
||||||
|
uninstall-local: uninstall-icons
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Encoding=UTF-8
|
|
||||||
Name=HDSPConf
|
Name=HDSPConf
|
||||||
Comment=Hammerfall DSP control application
|
Comment=Hammerfall DSP control application
|
||||||
Exec=hdspconf
|
Exec=hdspconf
|
||||||
FilePattern=hdspconf
|
Icon=hdspconf
|
||||||
Icon=hdspconf.png
|
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Categories=Application;AudioVideo;
|
Categories=AudioVideo;
|
||||||
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
|
@ -1,4 +1 @@
|
||||||
pixmapdir = $(PIXMAP_DIR)
|
EXTRA_DIST = $(wildcard *.xpm)
|
||||||
pixmap_DATA = hdspconf.png
|
|
||||||
|
|
||||||
EXTRA_DIST = $(wildcard *.xpm) hdspconf.png
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ public:
|
||||||
HC_AboutText(int x, int y, int w, int h);
|
HC_AboutText(int x, int y, int w, int h);
|
||||||
void draw();
|
void draw();
|
||||||
private:
|
private:
|
||||||
char *text;
|
const char *text;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#include "HC_Aeb.h"
|
#include "HC_Aeb.h"
|
||||||
|
|
||||||
static void setAebStatus(char *ctl_name, int val, int card_index)
|
static void setAebStatus(const char *ctl_name, int val, int card_index)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
char card_name[6];
|
char card_name[6];
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#include "HC_SpdifOut.h"
|
#include "HC_SpdifOut.h"
|
||||||
|
|
||||||
static void setSpdifBit(char *ctl_name, int val, int card_index)
|
static void setSpdifBit(const char *ctl_name, int val, int card_index)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
char card_name[6];
|
char card_name[6];
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ public:
|
||||||
void setAdatSyncStatus(unsigned char s);
|
void setAdatSyncStatus(unsigned char s);
|
||||||
void setWCStatus(unsigned char s);
|
void setWCStatus(unsigned char s);
|
||||||
private:
|
private:
|
||||||
char *adat_name;
|
const char *adat_name;
|
||||||
int h_step;
|
int h_step;
|
||||||
Fl_Box_Draw_F *draw_box;
|
Fl_Box_Draw_F *draw_box;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
EXTRA_DIST = gitcompile hdspmixer.desktop depcomp
|
EXTRA_DIST = gitcompile depcomp
|
||||||
SUBDIRS = src pixmaps
|
SUBDIRS = src pixmaps desktop
|
||||||
|
|
||||||
desktopdir = $(DESKTOP_DIR)
|
|
||||||
desktop_DATA = hdspmixer.desktop
|
|
||||||
|
|
||||||
alsa-dist: distdir
|
alsa-dist: distdir
|
||||||
@rm -rf ../distdir/hdspmixer
|
@rm -rf ../distdir/hdspmixer
|
||||||
|
|
|
||||||
|
|
@ -9,25 +9,6 @@ AC_PATH_X
|
||||||
|
|
||||||
AM_PATH_ALSA(1.0.0)
|
AM_PATH_ALSA(1.0.0)
|
||||||
|
|
||||||
dnl desktop install
|
|
||||||
AC_ARG_WITH(desktop-dir,
|
|
||||||
[ --with-desktop-dir specify the path to install desktop file],
|
|
||||||
[desktopdir="$withval"], [desktopdir=""])
|
|
||||||
if test -z "$desktopdir"; then
|
|
||||||
desktopdir=$datadir/applications
|
|
||||||
fi
|
|
||||||
DESKTOP_DIR="$desktopdir"
|
|
||||||
AC_SUBST(DESKTOP_DIR)
|
|
||||||
|
|
||||||
AC_ARG_WITH(pixmap-dir,
|
|
||||||
[ --with-pixmap-dir specify the path to install desktop pixmap file],
|
|
||||||
[pixmapdir="$withval"], [pixmapdir=""])
|
|
||||||
if test -z "$pixmapdir"; then
|
|
||||||
pixmapdir=$datadir/pixmaps
|
|
||||||
fi
|
|
||||||
PIXMAP_DIR="$pixmapdir"
|
|
||||||
AC_SUBST(PIXMAP_DIR)
|
|
||||||
|
|
||||||
dnl library check
|
dnl library check
|
||||||
AC_PATH_PROG(FLTK_CONFIG, fltk-config, no)
|
AC_PATH_PROG(FLTK_CONFIG, fltk-config, no)
|
||||||
if test "$FLTK_CONFIG" = "no" && ! test "`hostname -f`" = "alsa.alsa-project.org"; then
|
if test "$FLTK_CONFIG" = "no" && ! test "`hostname -f`" = "alsa.alsa-project.org"; then
|
||||||
|
|
@ -39,4 +20,4 @@ FLTK_LIBS="`$FLTK_CONFIG --ldflags`"
|
||||||
CXXFLAGS="$CXXFLAGS $ALSA_CFLAGS $FLTK_CXXFLAGS"
|
CXXFLAGS="$CXXFLAGS $ALSA_CFLAGS $FLTK_CXXFLAGS"
|
||||||
LIBS="$LIBS $ALSA_LIBS $FLTK_LIBS"
|
LIBS="$LIBS $ALSA_LIBS $FLTK_LIBS"
|
||||||
|
|
||||||
AC_OUTPUT(Makefile src/Makefile pixmaps/Makefile)
|
AC_OUTPUT(Makefile src/Makefile pixmaps/Makefile desktop/Makefile)
|
||||||
|
|
|
||||||
34
hdspmixer/desktop/Makefile.am
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
APPNAME = hdspmixer
|
||||||
|
|
||||||
|
desktopdir = $(datadir)/applications
|
||||||
|
desktop_DATA = $(APPNAME).desktop
|
||||||
|
|
||||||
|
public_icons = \
|
||||||
|
hicolor_apps_48x48_$(APPNAME).png
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
$(public_icons) \
|
||||||
|
$(desktop_DATA)
|
||||||
|
|
||||||
|
install-icons:
|
||||||
|
for icon in $(public_icons); do \
|
||||||
|
THEME=`echo $$icon | cut -d_ -f1`; \
|
||||||
|
CONTEXT=`echo $$icon | cut -d_ -f2`; \
|
||||||
|
SIZE=`echo $$icon | cut -d_ -f3`; \
|
||||||
|
ICONFILE=`echo $$icon | cut -d_ -f4`; \
|
||||||
|
mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
|
||||||
|
$(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-icons:
|
||||||
|
-for icon in $(public_icons); do \
|
||||||
|
THEME=`echo $$icon | cut -d_ -f1`; \
|
||||||
|
CONTEXT=`echo $$icon | cut -d_ -f2`; \
|
||||||
|
SIZE=`echo $$icon | cut -d_ -f3`; \
|
||||||
|
ICONFILE=`echo $$icon | cut -d_ -f4`; \
|
||||||
|
rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
|
||||||
|
done
|
||||||
|
|
||||||
|
install-data-local: install-icons
|
||||||
|
|
||||||
|
uninstall-local: uninstall-icons
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Encoding=UTF-8
|
|
||||||
Name=HDSPMixer
|
Name=HDSPMixer
|
||||||
Comment=Hammerfall DSP matrix mixer control GUI
|
Comment=Hammerfall DSP matrix mixer control GUI
|
||||||
Exec=hdspmixer
|
Exec=hdspmixer
|
||||||
FilePattern=hdspmixer
|
Icon=hdspmixer
|
||||||
Icon=hdspmixer.png
|
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Categories=Application;AudioVideo;
|
Categories=AudioVideo;
|
||||||
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
|
@ -1,4 +1,3 @@
|
||||||
pixmapdir = $(PIXMAP_DIR)
|
pixmapdir = $(PIXMAP_DIR)
|
||||||
pixmap_DATA = hdspmixer.png
|
|
||||||
|
|
||||||
EXTRA_DIST = $(wildcard *.xpm) hdspmixer.png
|
EXTRA_DIST = $(wildcard *.xpm)
|
||||||
|
|
|
||||||
69
hdspmixer/pixmaps/loopback.xpm
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
/* XPM */
|
||||||
|
char const * loopback_xpm[] = {
|
||||||
|
"34 15 51 1",
|
||||||
|
" c None",
|
||||||
|
". c #2E3038",
|
||||||
|
"+ c #FFFB7C",
|
||||||
|
"@ c #FDF97B",
|
||||||
|
"# c #2E2D11",
|
||||||
|
"$ c #000000",
|
||||||
|
"% c #383716",
|
||||||
|
"& c #898740",
|
||||||
|
"* c #F1EE75",
|
||||||
|
"= c #22210A",
|
||||||
|
"- c #727034",
|
||||||
|
"; c #E2DE6D",
|
||||||
|
"> c #D5D267",
|
||||||
|
", c #787637",
|
||||||
|
"' c #FBF77A",
|
||||||
|
") c #AAA750",
|
||||||
|
"! c #ABA851",
|
||||||
|
"~ c #CDC962",
|
||||||
|
"{ c #83813C",
|
||||||
|
"] c #C8C560",
|
||||||
|
"^ c #84823D",
|
||||||
|
"/ c #F7F378",
|
||||||
|
"( c #949145",
|
||||||
|
"_ c #B7B457",
|
||||||
|
": c #949245",
|
||||||
|
"< c #353414",
|
||||||
|
"[ c #87853F",
|
||||||
|
"} c #F1ED75",
|
||||||
|
"| c #3B3A17",
|
||||||
|
"1 c #DFDB6C",
|
||||||
|
"2 c #161505",
|
||||||
|
"3 c #4B4A20",
|
||||||
|
"4 c #E5E16E",
|
||||||
|
"5 c #FEFA7C",
|
||||||
|
"6 c #E8E470",
|
||||||
|
"7 c #535124",
|
||||||
|
"8 c #FAF679",
|
||||||
|
"9 c #E7E370",
|
||||||
|
"0 c #66642E",
|
||||||
|
"a c #E4E06E",
|
||||||
|
"b c #F6F277",
|
||||||
|
"c c #EAE671",
|
||||||
|
"d c #E0DC6C",
|
||||||
|
"e c #B9B658",
|
||||||
|
"f c #5F5D2A",
|
||||||
|
"g c #EDE973",
|
||||||
|
"h c #69672F",
|
||||||
|
"i c #DDD96A",
|
||||||
|
"j c #333342",
|
||||||
|
"k c #32323E",
|
||||||
|
"l c #313136",
|
||||||
|
"..................................",
|
||||||
|
".++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++.",
|
||||||
|
".+++@#++++@$$%&*@$$=-;+@#++>,*+++.",
|
||||||
|
".+++@#++++@#+')!@#+@~{+@#+]^/++++.",
|
||||||
|
".+++@#++++@#+'!!@#+@~(+@#_:'+++++.",
|
||||||
|
".+++@#++++@$$<[}@$$$|1+@234++++++.",
|
||||||
|
".+++@#++++@#++++@#+5678@#90a+++++.",
|
||||||
|
".+++@#++++@#++++@#+59#b@#+c0d++++.",
|
||||||
|
".+++@$$$$e@#++++@$$2f]+@#++ghi+++.",
|
||||||
|
".++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++.",
|
||||||
|
"..jklllllllllkj....jklllllllllkj.."};
|
||||||
|
|
@ -1,220 +1,282 @@
|
||||||
/* XPM */
|
/* XPM */
|
||||||
char const * output_xpm[] = {
|
char const * output_xpm[] = {
|
||||||
"36 208 9 1",
|
"36 224 55 1",
|
||||||
" c #595966",
|
" c None",
|
||||||
". c #2E3038",
|
". c #595966",
|
||||||
"+ c #000000",
|
"+ c #2E3038",
|
||||||
"@ c #474951",
|
"@ c #000000",
|
||||||
"# c #404044",
|
"# c #474951",
|
||||||
"$ c #7A7A8F",
|
"$ c #404044",
|
||||||
"% c #27272B",
|
"% c #7A7A8F",
|
||||||
"& c #616176",
|
"& c #27272B",
|
||||||
"* c #737384",
|
"* c #616176",
|
||||||
" ",
|
"= c #737384",
|
||||||
" .................................. ",
|
"- c #757585",
|
||||||
" .................................. ",
|
"; c #D4D4D4",
|
||||||
" .................................. ",
|
"> c #D6D6D6",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
", c #D3D3D4",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"' c #C3C3C6",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
") c #848491",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"! c #D5D5D5",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"~ c #CACACB",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"{ c #93939C",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"] c #9D9DA5",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"^ c #C8C8CA",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"/ c #787888",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"( c #B6B6BA",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"_ c #A3A3AA",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
": c #C5C5C7",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"< c #A7A7AE",
|
||||||
" .................................. ",
|
"[ c #C4C4C6",
|
||||||
" .................................. ",
|
"} c #7D7D8C",
|
||||||
" .................................. ",
|
"| c #797989",
|
||||||
" .................................. ",
|
"1 c #C0C0C2",
|
||||||
" .................................. ",
|
"2 c #AFAFB4",
|
||||||
" .................................. ",
|
"3 c #BFBFC2",
|
||||||
" .................................. ",
|
"4 c #D3D3D3",
|
||||||
" .................................. ",
|
"5 c #95959F",
|
||||||
" ..................++++++++++...... ",
|
"6 c #D5D5D6",
|
||||||
" .@@@@@@@#$@@@.....++++++++++...... ",
|
"7 c #D1D1D2",
|
||||||
" ........%&........++++++++++...... ",
|
"8 c #91919B",
|
||||||
" ........%&........++++++++++...... ",
|
"9 c #757586",
|
||||||
" ........%&........++++++++++...... ",
|
"0 c #8E8E99",
|
||||||
" ........%&........++++++++++...... ",
|
"a c #D1D1D1",
|
||||||
" ........%&........++++++++++...... ",
|
"b c #8F8F99",
|
||||||
" ........%&........++++++++++...... ",
|
"c c #CBCBCD",
|
||||||
" ........%&........++++++++++...... ",
|
"d c #92929C",
|
||||||
" ........%&........++++++++++...... ",
|
"e c #7F7F8D",
|
||||||
" ........%&........++++++++++...... ",
|
"f c #8C8C97",
|
||||||
" ........%&........++++++++++...... ",
|
"g c #96969F",
|
||||||
" ........%&........++++++++++...... ",
|
"h c #AFAFB5",
|
||||||
" ........%&........++++++++++...... ",
|
"i c #CECECF",
|
||||||
" ........%&........++++++++++...... ",
|
"j c #A6A6AD",
|
||||||
" ........%&........++++++++++...... ",
|
"k c #8A8A96",
|
||||||
" ........%&........++++++++++...... ",
|
"l c #CCCCCD",
|
||||||
" ........%&........++++++++++...... ",
|
"m c #9898A1",
|
||||||
" ........%&........++++++++++...... ",
|
"n c #333342",
|
||||||
" ........%&........++++++++++...... ",
|
"o c #32323E",
|
||||||
" ........%&........++++++++++...... ",
|
"p c #313136",
|
||||||
" .@@@@@@@#$@@@.....++++++++++...... ",
|
"....................................",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" .@@@@@@@#$@@@.....++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".+#######$%###+++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .@@@@@@@#$@@@.....++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".+#######$%###+++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .@@@@@@@#$@@@.....++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".+#######$%###+++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .@@@@@@@#$@@@.....++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .@@@@@@@#$@@@.....++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".+#######$%###+++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .@@@@@@@#$@@@.....++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .@@@@@@@#$@@@.....++++++++++...... ",
|
".+#######$%###+++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".+#######$%###+++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..................++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".+#######$%###+++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".+#######$%###+++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".+#######$%###+++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" "};
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
|
".++++++++++++++++++@@@@@@@@@@++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
"....................................",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".+================================+.",
|
||||||
|
".+================================+.",
|
||||||
|
".+================================+.",
|
||||||
|
".+===-;====->>,')->>!~{=-;==]^)===+.",
|
||||||
|
".+===-;====-;=/((-;=-_:=-;=<[}====+.",
|
||||||
|
".+===-;====-;=|((-;=-_1=-;23/=====+.",
|
||||||
|
".+===-;====->>,[)->>>45=-678======+.",
|
||||||
|
".+===-;====-;====-;=90a|-;bcd=====+.",
|
||||||
|
".+===-;====-;====-;=9b;e-;=fcg====+.",
|
||||||
|
".+===->>>>h-;====->>6ij=-;==klm===+.",
|
||||||
|
".+================================+.",
|
||||||
|
".+================================+.",
|
||||||
|
".+================================+.",
|
||||||
|
".++nopppppppppon++++nopppppppppon++.",
|
||||||
|
"...................................."};
|
||||||
|
|
|
||||||
|
|
@ -1,220 +1,282 @@
|
||||||
/* XPM */
|
/* XPM */
|
||||||
char const * output_r_xpm[] = {
|
char const * output_r_xpm[] = {
|
||||||
"36 208 9 1",
|
"36 224 55 1",
|
||||||
" c #595966",
|
" c None",
|
||||||
". c #2E3038",
|
". c #595966",
|
||||||
"+ c #000000",
|
"+ c #2E3038",
|
||||||
"@ c #474951",
|
"@ c #000000",
|
||||||
"# c #404044",
|
"# c #474951",
|
||||||
"$ c #7A7A8F",
|
"$ c #404044",
|
||||||
"% c #27272B",
|
"% c #7A7A8F",
|
||||||
"& c #616176",
|
"& c #27272B",
|
||||||
"* c #737384",
|
"* c #616176",
|
||||||
" ",
|
"= c #737384",
|
||||||
" .................................. ",
|
"- c #757585",
|
||||||
" .................................. ",
|
"; c #D4D4D4",
|
||||||
" .................................. ",
|
"> c #D6D6D6",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
", c #D3D3D4",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"' c #C3C3C6",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
") c #848491",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"! c #D5D5D5",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"~ c #CACACB",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"{ c #93939C",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"] c #9D9DA5",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"^ c #C8C8CA",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"/ c #787888",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"( c #B6B6BA",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"_ c #A3A3AA",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
": c #C5C5C7",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
"< c #A7A7AE",
|
||||||
" .................................. ",
|
"[ c #C4C4C6",
|
||||||
" .................................. ",
|
"} c #7D7D8C",
|
||||||
" .................................. ",
|
"| c #797989",
|
||||||
" .................................. ",
|
"1 c #C0C0C2",
|
||||||
" .................................. ",
|
"2 c #AFAFB4",
|
||||||
" .................................. ",
|
"3 c #BFBFC2",
|
||||||
" .................................. ",
|
"4 c #D3D3D3",
|
||||||
" .................................. ",
|
"5 c #95959F",
|
||||||
" ..................++++++++++...... ",
|
"6 c #D5D5D6",
|
||||||
" .@@@@@@@#$@@@.....++++++++++...... ",
|
"7 c #D1D1D2",
|
||||||
" ........%&........++++++++++...... ",
|
"8 c #91919B",
|
||||||
" ........%&........++++++++++...... ",
|
"9 c #757586",
|
||||||
" ........%&........++++++++++...... ",
|
"0 c #8E8E99",
|
||||||
" ........%&........++++++++++...... ",
|
"a c #D1D1D1",
|
||||||
" ........%&........++++++++++...... ",
|
"b c #8F8F99",
|
||||||
" ........%&........++++++++++...... ",
|
"c c #CBCBCD",
|
||||||
" ........%&........++++++++++...... ",
|
"d c #92929C",
|
||||||
" ........%&........++++++++++...... ",
|
"e c #7F7F8D",
|
||||||
" ........%&........++++++++++...... ",
|
"f c #8C8C97",
|
||||||
" ........%&........++++++++++...... ",
|
"g c #96969F",
|
||||||
" ........%&........++++++++++...... ",
|
"h c #AFAFB5",
|
||||||
" ........%&........++++++++++...... ",
|
"i c #CECECF",
|
||||||
" ........%&........++++++++++...... ",
|
"j c #A6A6AD",
|
||||||
" ........%&........++++++++++...... ",
|
"k c #8A8A96",
|
||||||
" ........%&........++++++++++...... ",
|
"l c #CCCCCD",
|
||||||
" ........%&........++++++++++...... ",
|
"m c #9898A1",
|
||||||
" ........%&........++++++++++...... ",
|
"n c #333342",
|
||||||
" ........%&........++++++++++...... ",
|
"o c #32323E",
|
||||||
" ........%&........++++++++++...... ",
|
"p c #313136",
|
||||||
" .@@@@@@@#$@@@.....++++++++++...... ",
|
"....................................",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" .@@@@@@@#$@@@.....++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++++++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".+#######$%###+++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .@@@@@@@#$@@@.....++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".+#######$%###+++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .@@@@@@@#$@@@.....++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".+#######$%###+++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .@@@@@@@#$@@@.....++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .@@@@@@@#$@@@.....++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".+#######$%###+++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .@@@@@@@#$@@@.....++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .@@@@@@@#$@@@.....++++++++++...... ",
|
".+#######$%###+++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".+#######$%###+++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ........%&........++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..................++++++++++...... ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".+#######$%###+++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".+#######$%###+++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..++++++++++++++++++++++++++++++.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".+#######$%###+++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" ..******************************.. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" .................................. ",
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
" "};
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
|
".++++++++&*++++++++@@@@@@@@@@++++++.",
|
||||||
|
".++++++++++++++++++@@@@@@@@@@++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++==============================++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
"....................................",
|
||||||
|
".++++++++++++++++++++++++++++++++++.",
|
||||||
|
".+================================+.",
|
||||||
|
".+================================+.",
|
||||||
|
".+================================+.",
|
||||||
|
".+===-;====->>,')->>!~{=-;==]^)===+.",
|
||||||
|
".+===-;====-;=/((-;=-_:=-;=<[}====+.",
|
||||||
|
".+===-;====-;=|((-;=-_1=-;23/=====+.",
|
||||||
|
".+===-;====->>,[)->>>45=-678======+.",
|
||||||
|
".+===-;====-;====-;=90a|-;bcd=====+.",
|
||||||
|
".+===-;====-;====-;=9b;e-;=fcg====+.",
|
||||||
|
".+===->>>>h-;====->>6ij=-;==klm===+.",
|
||||||
|
".+================================+.",
|
||||||
|
".+================================+.",
|
||||||
|
".+================================+.",
|
||||||
|
".++nopppppppppon++++nopppppppppon++.",
|
||||||
|
"...................................."};
|
||||||
|
|
|
||||||
|
|
@ -231,6 +231,8 @@ void HDSPMixerCard::adjustSettings() {
|
||||||
/* should never happen */
|
/* should never happen */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
max_channels = sizeof(channel_map_mf_ss);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == Digiface) {
|
if (type == Digiface) {
|
||||||
|
|
@ -253,6 +255,8 @@ void HDSPMixerCard::adjustSettings() {
|
||||||
/* should never happen */
|
/* should never happen */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
max_channels = sizeof(channel_map_df_ss);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == RPM) {
|
if (type == RPM) {
|
||||||
|
|
@ -263,6 +267,8 @@ void HDSPMixerCard::adjustSettings() {
|
||||||
channel_map_input = channel_map_playback = channel_map_rpm;
|
channel_map_input = channel_map_playback = channel_map_rpm;
|
||||||
dest_map = dest_map_rpm;
|
dest_map = dest_map_rpm;
|
||||||
meter_map_input = meter_map_playback = channel_map_rpm;
|
meter_map_input = meter_map_playback = channel_map_rpm;
|
||||||
|
|
||||||
|
max_channels = sizeof(channel_map_rpm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -286,6 +292,8 @@ void HDSPMixerCard::adjustSettings() {
|
||||||
/* should never happen */
|
/* should never happen */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
max_channels = sizeof(channel_map_df_ss);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == H9632) {
|
if (type == H9632) {
|
||||||
|
|
@ -312,6 +320,8 @@ void HDSPMixerCard::adjustSettings() {
|
||||||
meter_map_input = meter_map_playback = channel_map_h9632_qs;
|
meter_map_input = meter_map_playback = channel_map_h9632_qs;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
max_channels = sizeof(channel_map_h9632_ss);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HDSPeMADI == type) {
|
if (HDSPeMADI == type) {
|
||||||
|
|
@ -341,6 +351,7 @@ void HDSPMixerCard::adjustSettings() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
max_channels = sizeof(channel_map_unity_ss);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HDSPeAIO == type) {
|
if (HDSPeAIO == type) {
|
||||||
|
|
@ -379,6 +390,7 @@ void HDSPMixerCard::adjustSettings() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
max_channels = sizeof(channel_map_aio_out_ss);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HDSP_AES == type) {
|
if (HDSP_AES == type) {
|
||||||
|
|
@ -394,6 +406,7 @@ void HDSPMixerCard::adjustSettings() {
|
||||||
meter_map_input = channel_map_aes32;
|
meter_map_input = channel_map_aes32;
|
||||||
meter_map_playback = channel_map_aes32;
|
meter_map_playback = channel_map_aes32;
|
||||||
|
|
||||||
|
max_channels = sizeof(channel_map_aes32);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HDSPeRayDAT == type) {
|
if (HDSPeRayDAT == type) {
|
||||||
|
|
@ -426,6 +439,7 @@ void HDSPMixerCard::adjustSettings() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
max_channels = sizeof(channel_map_raydat_ss);
|
||||||
}
|
}
|
||||||
|
|
||||||
window_width = (channels_playback+2)*STRIP_WIDTH;
|
window_width = (channels_playback+2)*STRIP_WIDTH;
|
||||||
|
|
@ -545,3 +559,23 @@ int HDSPMixerCard::initializeCard(HDSPMixerWindow *w)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int HDSPMixerCard::supportsLoopback() const
|
||||||
|
{
|
||||||
|
int err = 0;
|
||||||
|
snd_ctl_elem_value_t *elemval;
|
||||||
|
snd_ctl_elem_id_t * elemid;
|
||||||
|
snd_ctl_t *handle;
|
||||||
|
snd_ctl_elem_value_alloca(&elemval);
|
||||||
|
snd_ctl_elem_id_alloca(&elemid);
|
||||||
|
if ((err = snd_ctl_open(&handle, name, SND_CTL_NONBLOCK)) < 0)
|
||||||
|
return err;
|
||||||
|
|
||||||
|
snd_ctl_elem_id_set_name(elemid, "Output Loopback");
|
||||||
|
snd_ctl_elem_id_set_interface(elemid, SND_CTL_ELEM_IFACE_HWDEP);
|
||||||
|
snd_ctl_elem_id_set_index(elemid, 0);
|
||||||
|
snd_ctl_elem_value_set_id(elemval, elemid);
|
||||||
|
err = snd_ctl_elem_read(handle, elemval);
|
||||||
|
snd_ctl_close(handle);
|
||||||
|
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ public:
|
||||||
HDSPMixerCard(int cardtype, int id, char *shortname);
|
HDSPMixerCard(int cardtype, int id, char *shortname);
|
||||||
int channels_input, channels_playback, window_width, window_height, card_id;
|
int channels_input, channels_playback, window_width, window_height, card_id;
|
||||||
int channels_output;
|
int channels_output;
|
||||||
|
int max_channels;
|
||||||
int type;
|
int type;
|
||||||
int last_preset; /* Last activated preset before switching to another card */
|
int last_preset; /* Last activated preset before switching to another card */
|
||||||
int last_dirty; /* Last dirty flag before switching to another card */
|
int last_dirty; /* Last dirty flag before switching to another card */
|
||||||
|
|
@ -68,6 +69,7 @@ public:
|
||||||
void adjustSettings();
|
void adjustSettings();
|
||||||
void getAeb();
|
void getAeb();
|
||||||
hdsp_9632_aeb_t h9632_aeb;
|
hdsp_9632_aeb_t h9632_aeb;
|
||||||
|
int supportsLoopback() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
133
hdspmixer/src/HDSPMixerLoopback.cxx
Normal file
|
|
@ -0,0 +1,133 @@
|
||||||
|
/*
|
||||||
|
* HDSPMixer
|
||||||
|
*
|
||||||
|
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 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 General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma implementation
|
||||||
|
#include "HDSPMixerLoopback.h"
|
||||||
|
|
||||||
|
HDSPMixerLoopback::HDSPMixerLoopback(int x, int y, int idx):Fl_Widget(x, y, 34, 15)
|
||||||
|
{
|
||||||
|
basew = (HDSPMixerWindow *)window();
|
||||||
|
index = idx;
|
||||||
|
}
|
||||||
|
|
||||||
|
void HDSPMixerLoopback::draw()
|
||||||
|
{
|
||||||
|
if (_loopback == 1)
|
||||||
|
fl_draw_pixmap(loopback_xpm, x(), y());
|
||||||
|
}
|
||||||
|
|
||||||
|
int HDSPMixerLoopback::get()
|
||||||
|
{
|
||||||
|
auto const card { basew->cards[basew->current_card] };
|
||||||
|
|
||||||
|
if (card->supportsLoopback() != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (index >= card->max_channels)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
int err;
|
||||||
|
snd_ctl_elem_value_t *elemval;
|
||||||
|
snd_ctl_elem_id_t * elemid;
|
||||||
|
snd_ctl_t *handle;
|
||||||
|
snd_ctl_elem_value_alloca(&elemval);
|
||||||
|
snd_ctl_elem_id_alloca(&elemid);
|
||||||
|
char const * const name = basew->cards[basew->current_card]->name;
|
||||||
|
if ((err = snd_ctl_open(&handle, name, SND_CTL_NONBLOCK)) < 0) {
|
||||||
|
fprintf(stderr, "Error accessing ctl interface on card %s\n.", name);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
snd_ctl_elem_id_set_name(elemid, "Output Loopback");
|
||||||
|
snd_ctl_elem_id_set_interface(elemid, SND_CTL_ELEM_IFACE_HWDEP);
|
||||||
|
snd_ctl_elem_id_set_index(elemid, index);
|
||||||
|
snd_ctl_elem_value_set_id(elemval, elemid);
|
||||||
|
if ((err = snd_ctl_elem_read(handle, elemval)) < 0)
|
||||||
|
fprintf(stderr, "cannot read loopback: %d\n", err);
|
||||||
|
else
|
||||||
|
_loopback = snd_ctl_elem_value_get_integer(elemval, 0);
|
||||||
|
|
||||||
|
snd_ctl_close(handle);
|
||||||
|
|
||||||
|
return _loopback;
|
||||||
|
}
|
||||||
|
|
||||||
|
void HDSPMixerLoopback::set(int l)
|
||||||
|
{
|
||||||
|
auto const card { basew->cards[basew->current_card] };
|
||||||
|
|
||||||
|
if (card->supportsLoopback() != 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (index >= card->max_channels)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (l != _loopback) {
|
||||||
|
int err;
|
||||||
|
|
||||||
|
snd_ctl_elem_id_t *id;
|
||||||
|
snd_ctl_elem_value_t *ctl;
|
||||||
|
snd_ctl_t *handle;
|
||||||
|
|
||||||
|
snd_ctl_elem_value_alloca(&ctl);
|
||||||
|
snd_ctl_elem_id_alloca(&id);
|
||||||
|
snd_ctl_elem_id_set_name(id, "Output Loopback");
|
||||||
|
snd_ctl_elem_id_set_interface(id, SND_CTL_ELEM_IFACE_HWDEP);
|
||||||
|
snd_ctl_elem_id_set_device(id, 0);
|
||||||
|
snd_ctl_elem_id_set_index(id, index);
|
||||||
|
snd_ctl_elem_value_set_id(ctl, id);
|
||||||
|
|
||||||
|
if ((err = snd_ctl_open(
|
||||||
|
&handle, basew->cards[basew->current_card]->name, SND_CTL_NONBLOCK)) < 0) {
|
||||||
|
fprintf(stderr, "Alsa error 1: %s\n", snd_strerror(err));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
snd_ctl_elem_value_set_integer(ctl, 0, l);
|
||||||
|
if ((err = snd_ctl_elem_write(handle, ctl)) < 0) {
|
||||||
|
fprintf(stderr, "Alsa error 2: %s\n", snd_strerror(err));
|
||||||
|
snd_ctl_close(handle);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_loopback = l;
|
||||||
|
|
||||||
|
snd_ctl_close(handle);
|
||||||
|
|
||||||
|
redraw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int HDSPMixerLoopback::handle(int e)
|
||||||
|
{
|
||||||
|
int button3 = Fl::event_button3();
|
||||||
|
switch (e) {
|
||||||
|
case FL_PUSH:
|
||||||
|
set(!_loopback);
|
||||||
|
if (button3)
|
||||||
|
relative->set(_loopback);
|
||||||
|
basew->checkState();
|
||||||
|
redraw();
|
||||||
|
return 1;
|
||||||
|
default:
|
||||||
|
return Fl_Widget::handle(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
48
hdspmixer/src/HDSPMixerLoopback.h
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
/*
|
||||||
|
* HDSPMixer
|
||||||
|
*
|
||||||
|
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 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 General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma interface
|
||||||
|
#ifndef HDSPMixerLoopback_H
|
||||||
|
#define HDSPMixerLoopback_H
|
||||||
|
|
||||||
|
#include <FL/Fl.H>
|
||||||
|
#include <FL/Fl_Widget.H>
|
||||||
|
#include "HDSPMixerWindow.h"
|
||||||
|
#include "pixmaps.h"
|
||||||
|
|
||||||
|
class HDSPMixerWindow;
|
||||||
|
|
||||||
|
class HDSPMixerLoopback:public Fl_Widget
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
HDSPMixerWindow *basew;
|
||||||
|
int _loopback{-1};
|
||||||
|
public:
|
||||||
|
HDSPMixerLoopback *relative;
|
||||||
|
int index;
|
||||||
|
HDSPMixerLoopback(int x, int y, int idx);
|
||||||
|
void draw();
|
||||||
|
int handle(int e);
|
||||||
|
int get();
|
||||||
|
void set(int l);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
@ -93,7 +93,7 @@ static char const *labels_aio_ss_input[18] = {
|
||||||
"AES.L", "AES.R",
|
"AES.L", "AES.R",
|
||||||
"A 1", "A 2", "A 3", "A 4",
|
"A 1", "A 2", "A 3", "A 4",
|
||||||
"A 5", "A 6", "A 7", "A 8",
|
"A 5", "A 6", "A 7", "A 8",
|
||||||
"AEB 1", "AEB 2", "AEB 3," "AEB 4"
|
"AEB 1", "AEB 2", "AEB 3", "AEB 4"
|
||||||
};
|
};
|
||||||
|
|
||||||
static char const *labels_aio_ss_playback[20] = {
|
static char const *labels_aio_ss_playback[20] = {
|
||||||
|
|
@ -204,6 +204,7 @@ HDSPMixerOutput::HDSPMixerOutput(int x, int y, int w, int h, int num):Fl_Group(x
|
||||||
peak = new HDSPMixerPeak(x+3, y+4, 0);
|
peak = new HDSPMixerPeak(x+3, y+4, 0);
|
||||||
gain = new HDSPMixerGain(x+3, y+175, 0);
|
gain = new HDSPMixerGain(x+3, y+175, 0);
|
||||||
meter = new HDSPMixerMeter(x+20, y+27, false, peak);
|
meter = new HDSPMixerMeter(x+20, y+27, false, peak);
|
||||||
|
loopback = new HDSPMixerLoopback(x+1, y+208, out_num);
|
||||||
end();
|
end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
#include <FL/fl_draw.H>
|
#include <FL/fl_draw.H>
|
||||||
#include <alsa/sound/hdsp.h>
|
#include <alsa/sound/hdsp.h>
|
||||||
#include "HDSPMixerFader.h"
|
#include "HDSPMixerFader.h"
|
||||||
|
#include "HDSPMixerLoopback.h"
|
||||||
#include "HDSPMixerPeak.h"
|
#include "HDSPMixerPeak.h"
|
||||||
#include "HDSPMixerGain.h"
|
#include "HDSPMixerGain.h"
|
||||||
#include "HDSPMixerMeter.h"
|
#include "HDSPMixerMeter.h"
|
||||||
|
|
@ -36,6 +37,7 @@
|
||||||
|
|
||||||
class HDSPMixerFader;
|
class HDSPMixerFader;
|
||||||
class HDSPMixerGain;
|
class HDSPMixerGain;
|
||||||
|
class HDSPMixerLoopback;
|
||||||
class HDSPMixerPeak;
|
class HDSPMixerPeak;
|
||||||
class HDSPMixerMeter;
|
class HDSPMixerMeter;
|
||||||
class HDSPMixerOutputData;
|
class HDSPMixerOutputData;
|
||||||
|
|
@ -56,6 +58,7 @@ public:
|
||||||
HDSPMixerFader *fader;
|
HDSPMixerFader *fader;
|
||||||
HDSPMixerGain *gain;
|
HDSPMixerGain *gain;
|
||||||
HDSPMixerMeter *meter;
|
HDSPMixerMeter *meter;
|
||||||
|
HDSPMixerLoopback *loopback;
|
||||||
HDSPMixerOutput(int x, int y, int w, int h, int out);
|
HDSPMixerOutput(int x, int y, int w, int h, int out);
|
||||||
void draw();
|
void draw();
|
||||||
void draw_background();
|
void draw_background();
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ class HDSPMixerOutputData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int fader_pos;
|
int fader_pos;
|
||||||
|
int loopback;
|
||||||
HDSPMixerOutputData();
|
HDSPMixerOutputData();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,13 +25,15 @@ HDSPMixerOutputs::HDSPMixerOutputs(int x, int y, int w, int h, int nchans):Fl_Gr
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < HDSP_MAX_CHANNELS+2; i += 2) {
|
for (i = 0; i < HDSP_MAX_CHANNELS+2; i += 2) {
|
||||||
strips[i] = new HDSPMixerOutput((i*STRIP_WIDTH), y, STRIP_WIDTH, SMALLSTRIP_HEIGHT, i);
|
strips[i] = new HDSPMixerOutput((i*STRIP_WIDTH), y, STRIP_WIDTH, SMALLSTRIP_HEIGHT, i);
|
||||||
strips[i+1] = new HDSPMixerOutput(((i+1)*STRIP_WIDTH), y, STRIP_WIDTH, SMALLSTRIP_HEIGHT, i+1);
|
strips[i+1] = new HDSPMixerOutput(((i+1)*STRIP_WIDTH), y, STRIP_WIDTH, SMALLSTRIP_HEIGHT, i+1);
|
||||||
/* Setup linked stereo channels */
|
/* Setup linked stereo channels */
|
||||||
strips[i]->fader->relative = strips[i+1]->fader;
|
strips[i]->fader->relative = strips[i+1]->fader;
|
||||||
strips[i+1]->fader->relative = strips[i]->fader;
|
strips[i+1]->fader->relative = strips[i]->fader;
|
||||||
strips[i]->fader->gain = strips[i]->gain;
|
strips[i]->fader->gain = strips[i]->gain;
|
||||||
strips[i+1]->fader->gain = strips[i+1]->gain;
|
strips[i+1]->fader->gain = strips[i+1]->gain;
|
||||||
|
strips[i]->loopback->relative = strips[i+1]->loopback;
|
||||||
|
strips[i+1]->loopback->relative = strips[i]->loopback;
|
||||||
|
|
||||||
}
|
}
|
||||||
empty_aebo[0] = new HDSPMixerEmpty((nchans-6)*STRIP_WIDTH, y, 2*STRIP_WIDTH, SMALLSTRIP_HEIGHT, 0);
|
empty_aebo[0] = new HDSPMixerEmpty((nchans-6)*STRIP_WIDTH, y, 2*STRIP_WIDTH, SMALLSTRIP_HEIGHT, 0);
|
||||||
|
|
|
||||||
|
|
@ -36,5 +36,6 @@ HDSPMixerPresetData::HDSPMixerPresetData()
|
||||||
over = 3;
|
over = 3;
|
||||||
level = 0;
|
level = 0;
|
||||||
rate = 1;
|
rate = 1;
|
||||||
|
loopback = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ public:
|
||||||
int over;
|
int over;
|
||||||
int rate;
|
int rate;
|
||||||
int rmsplus3;
|
int rmsplus3;
|
||||||
|
int loopback;
|
||||||
HDSPMixerPresetData();
|
HDSPMixerPresetData();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -143,6 +143,7 @@ void HDSPMixerPresets::save_preset(int prst) {
|
||||||
basew->playbacks->strips[i]->data[card][speed][p]->dest = basew->playbacks->strips[i]->targets->selected;
|
basew->playbacks->strips[i]->data[card][speed][p]->dest = basew->playbacks->strips[i]->targets->selected;
|
||||||
|
|
||||||
basew->outputs->strips[i]->data[card][speed][p]->fader_pos = basew->outputs->strips[i]->fader->pos[0];
|
basew->outputs->strips[i]->data[card][speed][p]->fader_pos = basew->outputs->strips[i]->fader->pos[0];
|
||||||
|
basew->outputs->strips[i]->data[card][speed][p]->loopback = basew->outputs->strips[i]->loopback->get();
|
||||||
}
|
}
|
||||||
/* Line outs */
|
/* Line outs */
|
||||||
basew->outputs->strips[HDSP_MAX_CHANNELS]->data[card][speed][p]->fader_pos = basew->outputs->strips[HDSP_MAX_CHANNELS]->fader->pos[0];
|
basew->outputs->strips[HDSP_MAX_CHANNELS]->data[card][speed][p]->fader_pos = basew->outputs->strips[HDSP_MAX_CHANNELS]->fader->pos[0];
|
||||||
|
|
@ -188,6 +189,7 @@ void HDSPMixerPresets::restore_preset(int prst) {
|
||||||
basew->playbacks->strips[i]->targets->selected = basew->playbacks->strips[i]->data[card][speed][p]->dest;
|
basew->playbacks->strips[i]->targets->selected = basew->playbacks->strips[i]->data[card][speed][p]->dest;
|
||||||
|
|
||||||
basew->outputs->strips[i]->fader->pos[0] = basew->outputs->strips[i]->data[card][speed][p]->fader_pos;
|
basew->outputs->strips[i]->fader->pos[0] = basew->outputs->strips[i]->data[card][speed][p]->fader_pos;
|
||||||
|
basew->outputs->strips[i]->loopback->set(basew->outputs->strips[i]->data[card][speed][p]->loopback);
|
||||||
}
|
}
|
||||||
/* Line outs */
|
/* Line outs */
|
||||||
basew->outputs->strips[HDSP_MAX_CHANNELS]->fader->pos[0] = basew->outputs->strips[HDSP_MAX_CHANNELS+1]->data[card][speed][p]->fader_pos;
|
basew->outputs->strips[HDSP_MAX_CHANNELS]->fader->pos[0] = basew->outputs->strips[HDSP_MAX_CHANNELS+1]->data[card][speed][p]->fader_pos;
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,8 @@ static void readregisters_cb(void *arg)
|
||||||
hdsp_peak_rms_t hdsp_peak_rms;
|
hdsp_peak_rms_t hdsp_peak_rms;
|
||||||
struct hdspm_peak_rms hdspm_peak_rms;
|
struct hdspm_peak_rms hdspm_peak_rms;
|
||||||
bool isMADI = false;
|
bool isMADI = false;
|
||||||
uint32_t *input_peaks, *playback_peaks, *output_peaks;
|
__u32 *input_peaks, *playback_peaks, *output_peaks;
|
||||||
uint64_t *input_rms, *playback_rms, *output_rms;
|
__u64 *input_rms, *playback_rms, *output_rms;
|
||||||
|
|
||||||
HDSPMixerWindow *w = (HDSPMixerWindow *)arg;
|
HDSPMixerWindow *w = (HDSPMixerWindow *)arg;
|
||||||
|
|
||||||
|
|
@ -353,18 +353,25 @@ void HDSPMixerWindow::save()
|
||||||
sizeof(inputs->strips[0]->data[0][0][0]->fader_pos) /
|
sizeof(inputs->strips[0]->data[0][0][0]->fader_pos) /
|
||||||
sizeof(inputs->strips[0]->data[0][0][0]->fader_pos[0]));
|
sizeof(inputs->strips[0]->data[0][0][0]->fader_pos[0]));
|
||||||
|
|
||||||
|
FILE *in,*out;
|
||||||
|
|
||||||
FILE *file;
|
/* We want to append any existing extra data that might got written by a
|
||||||
|
* newer version to this file, therefore write our data to file_name.tmp
|
||||||
|
* and append the old data. Also this way we would not corrupt the file
|
||||||
|
* should we crash.
|
||||||
|
*/
|
||||||
|
std::string const tmp = file_name + std::string(".tmp");
|
||||||
|
char const * const tmpc = tmp.c_str();
|
||||||
|
|
||||||
if ((file = fopen(file_name, "w")) == NULL) {
|
if ((out = fopen(tmpc, "w")) == NULL) {
|
||||||
fl_alert("Error opening file %s for saving", file_name);
|
fl_alert("Error opening file %s for saving", tmpc);
|
||||||
}
|
}
|
||||||
if (dirty) {
|
if (dirty) {
|
||||||
inputs->buttons->presets->save_preset(current_preset+1);
|
inputs->buttons->presets->save_preset(current_preset+1);
|
||||||
}
|
}
|
||||||
/* since hdspmixer 1.11, we also store the meter level settings. Indicate
|
/* since hdspmixer 1.11, we also store the meter level settings. Indicate
|
||||||
* the new on-disk structure via a small header */
|
* the new on-disk structure via a small header */
|
||||||
if (fwrite((void *)&header, sizeof(char), sizeof(header), file) !=
|
if (fwrite((void *)&header, sizeof(char), sizeof(header), out) !=
|
||||||
sizeof(header)) {
|
sizeof(header)) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
|
|
@ -374,99 +381,145 @@ void HDSPMixerWindow::save()
|
||||||
for (int preset = 0; preset < 8; ++preset) {
|
for (int preset = 0; preset < 8; ++preset) {
|
||||||
for (int channel = 0; channel < HDSP_MAX_CHANNELS; ++channel) {
|
for (int channel = 0; channel < HDSP_MAX_CHANNELS; ++channel) {
|
||||||
/* inputs pans and volumes */
|
/* inputs pans and volumes */
|
||||||
if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->pan_pos[0]), sizeof(int), pan_array_size, file) != pan_array_size) {
|
if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->pan_pos[0]), sizeof(int), pan_array_size, out) != pan_array_size) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->fader_pos[0]), sizeof(int), pan_array_size, file) != pan_array_size) {
|
if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->fader_pos[0]), sizeof(int), pan_array_size, out) != pan_array_size) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
/* playbacks pans and volumes */
|
/* playbacks pans and volumes */
|
||||||
if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->pan_pos[0]), sizeof(int), pan_array_size, file) != pan_array_size) {
|
if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->pan_pos[0]), sizeof(int), pan_array_size, out) != pan_array_size) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->fader_pos[0]), sizeof(int), pan_array_size, file) != pan_array_size) {
|
if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->fader_pos[0]), sizeof(int), pan_array_size, out) != pan_array_size) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
/* inputs mute/solo/dest */
|
/* inputs mute/solo/dest */
|
||||||
if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->mute), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->mute), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->solo), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->solo), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->dest), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->dest), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
/* playbacks mute/solo/dest */
|
/* playbacks mute/solo/dest */
|
||||||
if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->mute), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->mute), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->solo), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->solo), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->dest), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->dest), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
/* outputs volumes */
|
/* outputs volumes */
|
||||||
if (fwrite((void *)&(outputs->strips[channel]->data[card][speed][preset]->fader_pos), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(outputs->strips[channel]->data[card][speed][preset]->fader_pos), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/* Lineouts */
|
/* Lineouts */
|
||||||
if (fwrite((void *)&(outputs->strips[HDSP_MAX_CHANNELS]->data[card][speed][preset]->fader_pos), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(outputs->strips[HDSP_MAX_CHANNELS]->data[card][speed][preset]->fader_pos), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
if (fwrite((void *)&(outputs->strips[HDSP_MAX_CHANNELS+1]->data[card][speed][preset]->fader_pos), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(outputs->strips[HDSP_MAX_CHANNELS+1]->data[card][speed][preset]->fader_pos), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
/* Global settings */
|
/* Global settings */
|
||||||
if (fwrite((void *)&(data[card][speed][preset]->input), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(data[card][speed][preset]->input), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
if (fwrite((void *)&(data[card][speed][preset]->output), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(data[card][speed][preset]->output), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
if (fwrite((void *)&(data[card][speed][preset]->playback), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(data[card][speed][preset]->playback), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
if (fwrite((void *)&(data[card][speed][preset]->submix), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(data[card][speed][preset]->submix), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
if (fwrite((void *)&(data[card][speed][preset]->submix_value), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(data[card][speed][preset]->submix_value), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
if (fwrite((void *)&(data[card][speed][preset]->solo), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(data[card][speed][preset]->solo), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
if (fwrite((void *)&(data[card][speed][preset]->mute), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(data[card][speed][preset]->mute), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
if (fwrite((void *)&(data[card][speed][preset]->last_destination), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(data[card][speed][preset]->last_destination), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
if (fwrite((void *)&(data[card][speed][preset]->rmsplus3), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(data[card][speed][preset]->rmsplus3), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
if (fwrite((void *)&(data[card][speed][preset]->numbers), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(data[card][speed][preset]->numbers), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
if (fwrite((void *)&(data[card][speed][preset]->over), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(data[card][speed][preset]->over), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
if (fwrite((void *)&(data[card][speed][preset]->level), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(data[card][speed][preset]->level), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
if (fwrite((void *)&(data[card][speed][preset]->rate), sizeof(int), 1, file) != 1) {
|
if (fwrite((void *)&(data[card][speed][preset]->rate), sizeof(int), 1, out) != 1) {
|
||||||
goto save_error;
|
goto save_error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fclose(file);
|
|
||||||
|
/* Output loopback data */
|
||||||
|
for (int channel = 0; channel < HDSP_MAX_CHANNELS; ++channel) {
|
||||||
|
auto const strip = outputs->strips[channel];
|
||||||
|
|
||||||
|
for (int card = 0; card < MAX_CARDS; ++card) {
|
||||||
|
auto const data = strip->data[card];
|
||||||
|
|
||||||
|
for (int speed = 0; speed < 3; ++speed) {
|
||||||
|
auto const spd = data[speed];
|
||||||
|
|
||||||
|
for (int preset = 0; preset < 8; ++preset) {
|
||||||
|
auto const data = spd[preset];
|
||||||
|
|
||||||
|
if (fwrite((void *)&(data->loopback),
|
||||||
|
sizeof(int),
|
||||||
|
1,
|
||||||
|
out) != 1)
|
||||||
|
goto save_error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If the file we want to write already exists it could be possible that it
|
||||||
|
* was saved with a newer version. If that is the case we just append its
|
||||||
|
* content to the new output file and that way ensure that we don't lose any
|
||||||
|
* data the new version wrote.
|
||||||
|
*/
|
||||||
|
if ((in = fopen(file_name, "r")) != NULL) {
|
||||||
|
if (!fseek(in, ftell(out), SEEK_SET)) {
|
||||||
|
char buff[512];
|
||||||
|
size_t read;
|
||||||
|
while ((read = fread(&buff, sizeof(char), sizeof(buff), in)) != 0)
|
||||||
|
fwrite(buff, sizeof(char), read, out);
|
||||||
|
if (ferror(in) || ferror(out))
|
||||||
|
fl_alert("Error appending %s to %s", file_name, tmpc);
|
||||||
|
}
|
||||||
|
fclose(in);
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose(out);
|
||||||
|
|
||||||
|
if (rename(tmpc, file_name))
|
||||||
|
fl_alert("Error renaming %s to %s", tmpc, file_name);
|
||||||
|
::remove(tmpc);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
save_error:
|
save_error:
|
||||||
fclose(file);
|
fclose(out);
|
||||||
fl_alert("Error saving presets to file %s", file_name);
|
fl_alert("Error saving presets to file %s", file_name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -489,6 +542,7 @@ void HDSPMixerWindow::load()
|
||||||
bool ondisk_v1 = false;
|
bool ondisk_v1 = false;
|
||||||
int pan_array_size = 14; /* old (pre 1.0.24) HDSP_MAX_DEST */
|
int pan_array_size = 14; /* old (pre 1.0.24) HDSP_MAX_DEST */
|
||||||
int channels_per_card = 26; /* old (pre 1.0.24) HDSP_MAX_CHANNELS */
|
int channels_per_card = 26; /* old (pre 1.0.24) HDSP_MAX_CHANNELS */
|
||||||
|
bool res = true;
|
||||||
|
|
||||||
if (fread(&buffer, sizeof(char), sizeof(buffer), file) != sizeof(buffer)) {
|
if (fread(&buffer, sizeof(char), sizeof(buffer), file) != sizeof(buffer)) {
|
||||||
goto load_error;
|
goto load_error;
|
||||||
|
|
@ -617,6 +671,46 @@ void HDSPMixerWindow::load()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Output loopback data */
|
||||||
|
for (int channel = 0; channel < HDSP_MAX_CHANNELS; ++channel) {
|
||||||
|
auto const strip = outputs->strips[channel];
|
||||||
|
|
||||||
|
for (int card = 0; card < MAX_CARDS; ++card) {
|
||||||
|
auto const data = strip->data[card];
|
||||||
|
|
||||||
|
for (int speed = 0; speed < 3; ++speed) {
|
||||||
|
auto const spd = data[speed];
|
||||||
|
|
||||||
|
for (int preset = 0; preset < 8; ++preset) {
|
||||||
|
auto const data = spd[preset];
|
||||||
|
|
||||||
|
/* TODO: Somewhere we get a value of 5 from, investigate
|
||||||
|
* this another day. For now just reset it here and
|
||||||
|
* continue looping to reset the value.
|
||||||
|
*/
|
||||||
|
data->loopback = 0;
|
||||||
|
|
||||||
|
if (feof(file)) {
|
||||||
|
res = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ferror(file)) {
|
||||||
|
res = false;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fread((void *)&(data->loopback), sizeof(int), 1, file) != 1)
|
||||||
|
res = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!res)
|
||||||
|
goto load_error;
|
||||||
|
|
||||||
fclose(file);
|
fclose(file);
|
||||||
setTitleWithFilename();
|
setTitleWithFilename();
|
||||||
resetMixer();
|
resetMixer();
|
||||||
|
|
@ -814,6 +908,8 @@ void HDSPMixerWindow::restoreDefaults(int card)
|
||||||
}
|
}
|
||||||
outputs->strips[i]->data[card][speed][preset]->fader_pos = (preset != 4) ? 137*CF : 0;
|
outputs->strips[i]->data[card][speed][preset]->fader_pos = (preset != 4) ? 137*CF : 0;
|
||||||
outputs->strips[i+1]->data[card][speed][preset]->fader_pos = (preset != 4) ? 137*CF : 0;
|
outputs->strips[i+1]->data[card][speed][preset]->fader_pos = (preset != 4) ? 137*CF : 0;
|
||||||
|
outputs->strips[i]->data[card][speed][preset]->loopback = 0;
|
||||||
|
outputs->strips[i+1]->data[card][speed][preset]->loopback = 0;
|
||||||
if (preset == 3 || preset == 7) {
|
if (preset == 3 || preset == 7) {
|
||||||
inputs->strips[i]->data[card][speed][preset]->mute = 1;
|
inputs->strips[i]->data[card][speed][preset]->mute = 1;
|
||||||
inputs->strips[i+1]->data[card][speed][preset]->mute = 1;
|
inputs->strips[i+1]->data[card][speed][preset]->mute = 1;
|
||||||
|
|
@ -1021,6 +1117,8 @@ void HDSPMixerWindow::checkState()
|
||||||
/* Outputs row */
|
/* Outputs row */
|
||||||
if (outputs->strips[i]->data[current_card][speed][p]->fader_pos != outputs->strips[i]->fader->pos[0])
|
if (outputs->strips[i]->data[current_card][speed][p]->fader_pos != outputs->strips[i]->fader->pos[0])
|
||||||
corrupt++;
|
corrupt++;
|
||||||
|
if (outputs->strips[i]->data[current_card][speed][p]->loopback != outputs->strips[i]->loopback->get())
|
||||||
|
corrupt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Global settings */
|
/* Global settings */
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@ hdspmixer_SOURCES = \
|
||||||
HDSPMixerEmpty.h \
|
HDSPMixerEmpty.h \
|
||||||
HDSPMixerOutput.cxx \
|
HDSPMixerOutput.cxx \
|
||||||
HDSPMixerOutput.h \
|
HDSPMixerOutput.h \
|
||||||
|
HDSPMixerLoopback.cxx \
|
||||||
|
HDSPMixerLoopback.h \
|
||||||
HDSPMixerIOMixer.cxx \
|
HDSPMixerIOMixer.cxx \
|
||||||
HDSPMixerIOMixer.h \
|
HDSPMixerIOMixer.h \
|
||||||
HDSPMixerSelector.cxx \
|
HDSPMixerSelector.cxx \
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ char channel_map_mf_ss[26] = {
|
||||||
16, 17, 18, 19, 20, 21, 22, 23, /* ADAT */
|
16, 17, 18, 19, 20, 21, 22, 23, /* ADAT */
|
||||||
24, 25, /* SPDIF */
|
24, 25, /* SPDIF */
|
||||||
26, 27, /* Phones L+R, only a destination channel */
|
26, 27, /* Phones L+R, only a destination channel */
|
||||||
-1, -1, -1, -1, -1, -1
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1
|
||||||
};
|
};
|
||||||
|
|
||||||
// Digiface/Multiface
|
// Digiface/Multiface
|
||||||
|
|
@ -65,13 +65,13 @@ char meter_map_ds[26] = {
|
||||||
16, 17, 18, 19, /* ADAT on Multiface, ADAT3 on Digiface */
|
16, 17, 18, 19, /* ADAT on Multiface, ADAT3 on Digiface */
|
||||||
24, 25, /* SPDIF */
|
24, 25, /* SPDIF */
|
||||||
26, 27, /* Headphones */
|
26, 27, /* Headphones */
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1
|
||||||
};
|
};
|
||||||
|
|
||||||
char channel_map_ds[26] = {
|
char channel_map_ds[26] = {
|
||||||
1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23,
|
1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23,
|
||||||
24, 25,
|
24, 25,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1
|
||||||
};
|
};
|
||||||
|
|
||||||
char dest_map_ds[8] = {
|
char dest_map_ds[8] = {
|
||||||
|
|
@ -84,10 +84,10 @@ char dest_map_rpm[3] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
char channel_map_rpm[26] = {
|
char channel_map_rpm[26] = {
|
||||||
0, 1, 2, 3, 4, 5, -1, -1,
|
0, 1, 2, 3, 4, 5, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1
|
(char)-1, (char)-1
|
||||||
};
|
};
|
||||||
|
|
||||||
// HDSP 9652
|
// HDSP 9652
|
||||||
|
|
@ -158,21 +158,21 @@ char channel_map_unity_ds[HDSPM_MAX_CHANNELS] = {
|
||||||
16, 18, 20, 22, 24, 26, 28, 30,
|
16, 18, 20, 22, 24, 26, 28, 30,
|
||||||
32, 34, 36, 38, 40, 42, 44, 46,
|
32, 34, 36, 38, 40, 42, 44, 46,
|
||||||
48, 50, 52, 54, 56, 58, 60, 62,
|
48, 50, 52, 54, 56, 58, 60, 62,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
};
|
};
|
||||||
|
|
||||||
char channel_map_unity_qs[HDSPM_MAX_CHANNELS] = {
|
char channel_map_unity_qs[HDSPM_MAX_CHANNELS] = {
|
||||||
0, 4, 8, 12, 16, 20, 24, 28,
|
0, 4, 8, 12, 16, 20, 24, 28,
|
||||||
32, 36, 40, 44, 48, 52, 56, 60,
|
32, 36, 40, 44, 48, 52, 56, 60,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
};
|
};
|
||||||
|
|
||||||
// HDSPe RayDAT
|
// HDSPe RayDAT
|
||||||
|
|
@ -208,10 +208,10 @@ char channel_map_raydat_ss[HDSPM_MAX_CHANNELS] = {
|
||||||
28, 29, 30, 31, 32, 33, 34, 35, /* ADAT 4 */
|
28, 29, 30, 31, 32, 33, 34, 35, /* ADAT 4 */
|
||||||
0, 1, /* AES */
|
0, 1, /* AES */
|
||||||
2, 3, /* SPDIF */
|
2, 3, /* SPDIF */
|
||||||
-1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
};
|
};
|
||||||
|
|
||||||
char channel_map_raydat_ds[HDSPM_MAX_CHANNELS] = {
|
char channel_map_raydat_ds[HDSPM_MAX_CHANNELS] = {
|
||||||
|
|
@ -221,12 +221,12 @@ char channel_map_raydat_ds[HDSPM_MAX_CHANNELS] = {
|
||||||
16, 17, 18, 19, /* ADAT 4 */
|
16, 17, 18, 19, /* ADAT 4 */
|
||||||
0, 1, /* AES */
|
0, 1, /* AES */
|
||||||
2, 3, /* SPDIF */
|
2, 3, /* SPDIF */
|
||||||
-1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
};
|
};
|
||||||
|
|
||||||
char channel_map_raydat_qs[HDSPM_MAX_CHANNELS] = {
|
char channel_map_raydat_qs[HDSPM_MAX_CHANNELS] = {
|
||||||
|
|
@ -236,13 +236,13 @@ char channel_map_raydat_qs[HDSPM_MAX_CHANNELS] = {
|
||||||
10, 11, /* ADAT 4 */
|
10, 11, /* ADAT 4 */
|
||||||
0, 1, /* AES */
|
0, 1, /* AES */
|
||||||
2, 3, /* SPDIF */
|
2, 3, /* SPDIF */
|
||||||
-1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
};
|
};
|
||||||
|
|
||||||
// HDSPe AIO
|
// HDSPe AIO
|
||||||
|
|
@ -284,12 +284,12 @@ char channel_map_aio_in_ss[HDSPM_MAX_CHANNELS] = {
|
||||||
10, 11, /* spdif in */
|
10, 11, /* spdif in */
|
||||||
12, 13, 14, 15, 16, 17, 18, 19, /* ADAT in */
|
12, 13, 14, 15, 16, 17, 18, 19, /* ADAT in */
|
||||||
2, 3, 4, 5, /* AEB */
|
2, 3, 4, 5, /* AEB */
|
||||||
-1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
};
|
};
|
||||||
|
|
||||||
char channel_map_aio_out_ss[HDSPM_MAX_CHANNELS] = {
|
char channel_map_aio_out_ss[HDSPM_MAX_CHANNELS] = {
|
||||||
|
|
@ -299,12 +299,12 @@ char channel_map_aio_out_ss[HDSPM_MAX_CHANNELS] = {
|
||||||
12, 13, 14, 15, 16, 17, 18, 19, /* ADAT out */
|
12, 13, 14, 15, 16, 17, 18, 19, /* ADAT out */
|
||||||
6, 7, /* phone out */
|
6, 7, /* phone out */
|
||||||
2, 3, 4, 5, /* AEB */
|
2, 3, 4, 5, /* AEB */
|
||||||
-1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
};
|
};
|
||||||
|
|
||||||
char channel_map_aio_in_ds[HDSPM_MAX_CHANNELS] = {
|
char channel_map_aio_in_ds[HDSPM_MAX_CHANNELS] = {
|
||||||
|
|
@ -313,13 +313,13 @@ char channel_map_aio_in_ds[HDSPM_MAX_CHANNELS] = {
|
||||||
10, 11, /* spdif in */
|
10, 11, /* spdif in */
|
||||||
12, 14, 16, 18, /* adat in */
|
12, 14, 16, 18, /* adat in */
|
||||||
2, 3, 4, 5, /* AEB */
|
2, 3, 4, 5, /* AEB */
|
||||||
-1, -1,
|
(char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1
|
||||||
};
|
};
|
||||||
|
|
||||||
char channel_map_aio_out_ds[HDSPM_MAX_CHANNELS] = {
|
char channel_map_aio_out_ds[HDSPM_MAX_CHANNELS] = {
|
||||||
|
|
@ -329,12 +329,12 @@ char channel_map_aio_out_ds[HDSPM_MAX_CHANNELS] = {
|
||||||
12, 14, 16, 18, /* adat out */
|
12, 14, 16, 18, /* adat out */
|
||||||
6, 7, /* phone out */
|
6, 7, /* phone out */
|
||||||
2, 3, 4, 5, /* AEB */
|
2, 3, 4, 5, /* AEB */
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1
|
||||||
};
|
};
|
||||||
|
|
||||||
char channel_map_aio_in_qs[HDSPM_MAX_CHANNELS] = {
|
char channel_map_aio_in_qs[HDSPM_MAX_CHANNELS] = {
|
||||||
|
|
@ -343,13 +343,13 @@ char channel_map_aio_in_qs[HDSPM_MAX_CHANNELS] = {
|
||||||
10, 11, /* spdif in */
|
10, 11, /* spdif in */
|
||||||
12, 16, /* adat in */
|
12, 16, /* adat in */
|
||||||
2, 3, 4, 5, /* AEB */
|
2, 3, 4, 5, /* AEB */
|
||||||
-1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1
|
||||||
};
|
};
|
||||||
|
|
||||||
char channel_map_aio_out_qs[HDSPM_MAX_CHANNELS] = {
|
char channel_map_aio_out_qs[HDSPM_MAX_CHANNELS] = {
|
||||||
|
|
@ -359,13 +359,13 @@ char channel_map_aio_out_qs[HDSPM_MAX_CHANNELS] = {
|
||||||
12, 16, /* adat out */
|
12, 16, /* adat out */
|
||||||
6, 7, /* phone out */
|
6, 7, /* phone out */
|
||||||
2, 3, 4, 5, /* AEB */
|
2, 3, 4, 5, /* AEB */
|
||||||
-1, -1,
|
(char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1
|
||||||
};
|
};
|
||||||
|
|
||||||
// HDSP AES32 and HDSPe AES
|
// HDSP AES32 and HDSPe AES
|
||||||
|
|
@ -383,11 +383,11 @@ char channel_map_aes32[HDSPM_MAX_CHANNELS] = {
|
||||||
10, 11, /* AES 6 */
|
10, 11, /* AES 6 */
|
||||||
12, 13, /* AES 7 */
|
12, 13, /* AES 7 */
|
||||||
14, 15, /* AES 8 */
|
14, 15, /* AES 8 */
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1
|
(char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
#define STRIP_WIDTH 36
|
#define STRIP_WIDTH 36
|
||||||
#define FULLSTRIP_HEIGHT 253
|
#define FULLSTRIP_HEIGHT 253
|
||||||
#define SMALLSTRIP_HEIGHT 208
|
#define SMALLSTRIP_HEIGHT 224
|
||||||
#define MENU_HEIGHT 20
|
#define MENU_HEIGHT 20
|
||||||
|
|
||||||
#define MIN_WIDTH 2*STRIP_WIDTH
|
#define MIN_WIDTH 2*STRIP_WIDTH
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
HDSPMixerWindow *window;
|
HDSPMixerWindow *window;
|
||||||
HDSPMixerCard *hdsp_cards[3];
|
HDSPMixerCard *hdsp_cards[3];
|
||||||
char *name, *shortname;
|
char *name = NULL, *shortname;
|
||||||
int card;
|
int card;
|
||||||
int cards = 0;
|
int cards = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@
|
||||||
#include "../pixmaps/over.xpm"
|
#include "../pixmaps/over.xpm"
|
||||||
#include "../pixmaps/peak.xpm"
|
#include "../pixmaps/peak.xpm"
|
||||||
#include "../pixmaps/solo.xpm"
|
#include "../pixmaps/solo.xpm"
|
||||||
|
#include "../pixmaps/loopback.xpm"
|
||||||
#include "../pixmaps/iomixer_r.xpm"
|
#include "../pixmaps/iomixer_r.xpm"
|
||||||
#include "../pixmaps/output_r.xpm"
|
#include "../pixmaps/output_r.xpm"
|
||||||
#include "../pixmaps/matrix_black.xpm"
|
#include "../pixmaps/matrix_black.xpm"
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ extern char const * output_xpm[];
|
||||||
extern char const * over_xpm[];
|
extern char const * over_xpm[];
|
||||||
extern char const * peak_xpm[];
|
extern char const * peak_xpm[];
|
||||||
extern char const * solo_xpm[];
|
extern char const * solo_xpm[];
|
||||||
|
extern char const * loopback_xpm[];
|
||||||
extern char const * iomixer_r_xpm[];
|
extern char const * iomixer_r_xpm[];
|
||||||
extern char const * output_r_xpm[];
|
extern char const * output_r_xpm[];
|
||||||
extern char const * matrix_white_xpm[];
|
extern char const * matrix_white_xpm[];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
# # Process this file with automake to procude Makefile.in.
|
# Process this file with automake to produce Makefile.in.
|
||||||
|
SUBDIRS = desktop
|
||||||
bin_SCRIPTS = hwmixvolume
|
bin_SCRIPTS = hwmixvolume
|
||||||
#man_MANS =
|
#man_MANS =
|
||||||
EXTRA_DIST = gitcompile hwmixvolume
|
EXTRA_DIST = gitcompile hwmixvolume
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@ that use hardware mixing, i.e., those based on the following chips:
|
||||||
* Yamaha DS-1 (YMF-724/740/744/754) (driver: snd-ymfpci)
|
* Yamaha DS-1 (YMF-724/740/744/754) (driver: snd-ymfpci)
|
||||||
|
|
||||||
|
|
||||||
This tool requires Python, pygtk, and alsa-pyton 1.0.22 or later.
|
This tool requires Python, PyGObject, GTK+ 3.0 or later, and alsa-python 1.0.22
|
||||||
|
or later.
|
||||||
|
|
||||||
It is recommended to use at least Linux kernel 2.6.32 or alsa-driver 1.0.22;
|
It is recommended to use at least Linux kernel 2.6.32 or alsa-driver 1.0.22;
|
||||||
otherwise, the name of the program that is using a stream cannot be shown.
|
otherwise, the name of the program that is using a stream cannot be shown.
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,4 @@ AM_INIT_AUTOMAKE
|
||||||
AM_MAINTAINER_MODE([enable])
|
AM_MAINTAINER_MODE([enable])
|
||||||
AC_CONFIG_SRCDIR([hwmixvolume])
|
AC_CONFIG_SRCDIR([hwmixvolume])
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
AC_OUTPUT([Makefile])
|
AC_OUTPUT([Makefile desktop/Makefile])
|
||||||
|
|
|
||||||
36
hwmixvolume/desktop/Makefile.am
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
APPNAME = hwmixvolume
|
||||||
|
|
||||||
|
desktopdir = $(datadir)/applications
|
||||||
|
desktop_DATA = $(APPNAME).desktop
|
||||||
|
|
||||||
|
public_icons = \
|
||||||
|
hicolor_apps_256x256_$(APPNAME).png \
|
||||||
|
hicolor_apps_128x128_$(APPNAME).png \
|
||||||
|
hicolor_apps_48x48_$(APPNAME).png
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
$(public_icons) \
|
||||||
|
$(desktop_DATA)
|
||||||
|
|
||||||
|
install-icons:
|
||||||
|
for icon in $(public_icons); do \
|
||||||
|
THEME=`echo $$icon | cut -d_ -f1`; \
|
||||||
|
CONTEXT=`echo $$icon | cut -d_ -f2`; \
|
||||||
|
SIZE=`echo $$icon | cut -d_ -f3`; \
|
||||||
|
ICONFILE=`echo $$icon | cut -d_ -f4`; \
|
||||||
|
mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
|
||||||
|
$(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-icons:
|
||||||
|
-for icon in $(public_icons); do \
|
||||||
|
THEME=`echo $$icon | cut -d_ -f1`; \
|
||||||
|
CONTEXT=`echo $$icon | cut -d_ -f2`; \
|
||||||
|
SIZE=`echo $$icon | cut -d_ -f3`; \
|
||||||
|
ICONFILE=`echo $$icon | cut -d_ -f4`; \
|
||||||
|
rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
|
||||||
|
done
|
||||||
|
|
||||||
|
install-data-local: install-icons
|
||||||
|
|
||||||
|
uninstall-local: uninstall-icons
|
||||||
BIN
hwmixvolume/desktop/hicolor_apps_128x128_hwmixvolume.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
hwmixvolume/desktop/hicolor_apps_256x256_hwmixvolume.png
Normal file
|
After Width: | Height: | Size: 9.8 KiB |
BIN
hwmixvolume/desktop/hicolor_apps_48x48_hwmixvolume.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
9
hwmixvolume/desktop/hwmixvolume.desktop
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Hwmixvolume
|
||||||
|
GenericName=Control the volume of individual streams on sound cards that use hardware mixing
|
||||||
|
Exec=hwmixvolume
|
||||||
|
Icon=hwmixvolume
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=AudioVideo;
|
||||||
|
Version=0.9.4
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
# hwmixvolume - ALSA hardware mixer volume control applet
|
# hwmixvolume - ALSA hardware mixer volume control applet
|
||||||
# Copyright (c) 2009-2010 Clemens Ladisch
|
# Copyright (c) 2009-2010 Clemens Ladisch
|
||||||
|
# Copyright (c) 2018 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
|
||||||
#
|
#
|
||||||
# Permission to use, copy, modify, and/or distribute this software for any
|
# Permission to use, copy, modify, and/or distribute this software for any
|
||||||
# purpose with or without fee is hereby granted, provided that the above
|
# purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
@ -15,7 +16,10 @@
|
||||||
# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
# PERFORMANCE OF THIS SOFTWARE.
|
# PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
import gobject, gtk
|
import gi
|
||||||
|
gi.require_version('GLib', '2.0')
|
||||||
|
gi.require_version('Gtk', '3.0')
|
||||||
|
from gi.repository import GLib, Gtk
|
||||||
from pyalsa import alsacard, alsahcontrol
|
from pyalsa import alsacard, alsahcontrol
|
||||||
|
|
||||||
INTF_PCM = alsahcontrol.interface_id['PCM']
|
INTF_PCM = alsahcontrol.interface_id['PCM']
|
||||||
|
|
@ -26,285 +30,283 @@ EVENT_INFO = alsahcontrol.event_mask['INFO']
|
||||||
EVENT_REMOVE = alsahcontrol.event_mask_remove
|
EVENT_REMOVE = alsahcontrol.event_mask_remove
|
||||||
|
|
||||||
class Stream:
|
class Stream:
|
||||||
def __init__(self, element, parent):
|
def __init__(self, element, parent):
|
||||||
self.element = element
|
self.element = element
|
||||||
self.element.set_callback(self)
|
self.element.set_callback(self)
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.label = None
|
self.label = None
|
||||||
self.scales = []
|
self.scales = []
|
||||||
self.adjustments = []
|
self.adjustments = []
|
||||||
self.callback(self.element, EVENT_INFO)
|
self.callback(self.element, EVENT_INFO)
|
||||||
|
|
||||||
def destroy(self):
|
def destroy(self):
|
||||||
self.deactivate()
|
self.deactivate()
|
||||||
|
|
||||||
def callback(self, e, mask):
|
def callback(self, e, mask):
|
||||||
if mask == EVENT_REMOVE:
|
if mask == EVENT_REMOVE:
|
||||||
self.deactivate()
|
self.deactivate()
|
||||||
elif (mask & EVENT_INFO) != 0:
|
elif (mask & EVENT_INFO) != 0:
|
||||||
info = alsahcontrol.Info(self.element)
|
info = alsahcontrol.Info(self.element)
|
||||||
if info.is_inactive:
|
if info.is_inactive:
|
||||||
self.deactivate()
|
self.deactivate()
|
||||||
else:
|
else:
|
||||||
self.activate()
|
self.activate()
|
||||||
elif (mask & EVENT_VALUE) != 0:
|
elif (mask & EVENT_VALUE) != 0:
|
||||||
self.update_scales_from_ctl()
|
self.update_scales_from_ctl()
|
||||||
|
|
||||||
def activate(self):
|
def activate(self):
|
||||||
if self.label:
|
if self.label:
|
||||||
return
|
return
|
||||||
info = alsahcontrol.Info(self.element)
|
info = alsahcontrol.Info(self.element)
|
||||||
value = alsahcontrol.Value(self.element)
|
value = alsahcontrol.Value(self.element)
|
||||||
value.read()
|
value.read()
|
||||||
values = value.get_tuple(TYPE_INTEGER, info.count)
|
values = value.get_tuple(TYPE_INTEGER, info.count)
|
||||||
self.label = gtk.Label(self.get_label(info))
|
self.label = Gtk.Label.new(self.get_label(info))
|
||||||
self.label.set_single_line_mode(True)
|
self.label.set_single_line_mode(True)
|
||||||
self.parent.scales_vbox.pack_start(self.label, expand=False)
|
self.parent.scales_vbox.add(self.label)
|
||||||
for i in range(info.count):
|
for i in range(info.count):
|
||||||
adj = gtk.Adjustment(value=values[i],
|
adj = Gtk.Adjustment(value=values[i],
|
||||||
lower=info.min, upper=info.max,
|
lower=info.min, upper=info.max,
|
||||||
step_incr=1,
|
step_incr=1,
|
||||||
page_incr=(info.max-info.min+1)/8)
|
page_incr=(info.max-info.min+1)/8)
|
||||||
adj.connect('value-changed', self.update_ctl_from_scale, i)
|
adj.connect('value-changed', self.update_ctl_from_scale, i)
|
||||||
scale = gtk.HScale(adj)
|
scale = Gtk.Scale(orientation=Gtk.Orientation.HORIZONTAL, adjustment=adj)
|
||||||
scale.set_draw_value(False)
|
scale.set_draw_value(False)
|
||||||
self.parent.scales_vbox.pack_start(scale, expand=False)
|
self.parent.scales_vbox.add(scale)
|
||||||
self.scales.append(scale)
|
self.scales.append(scale)
|
||||||
self.adjustments.append(adj)
|
self.adjustments.append(adj)
|
||||||
self.parent.scales_vbox.show_all()
|
self.parent.scales_vbox.show_all()
|
||||||
self.parent.update_msg_label()
|
self.parent.update_msg_label()
|
||||||
|
|
||||||
def deactivate(self):
|
def deactivate(self):
|
||||||
if not self.label:
|
if not self.label:
|
||||||
return
|
return
|
||||||
self.label.destroy()
|
self.label.destroy()
|
||||||
for s in self.scales:
|
for s in self.scales:
|
||||||
s.destroy()
|
s.destroy()
|
||||||
self.label = None
|
self.label = None
|
||||||
self.scales = []
|
self.scales = []
|
||||||
self.adjustments = []
|
self.adjustments = []
|
||||||
self.parent.update_msg_label()
|
self.parent.update_msg_label()
|
||||||
|
|
||||||
def update_scales_from_ctl(self):
|
def update_scales_from_ctl(self):
|
||||||
if not self.label:
|
if not self.label:
|
||||||
return
|
return
|
||||||
count = len(self.adjustments)
|
count = len(self.adjustments)
|
||||||
value = alsahcontrol.Value(self.element)
|
value = alsahcontrol.Value(self.element)
|
||||||
value.read()
|
value.read()
|
||||||
values = value.get_tuple(TYPE_INTEGER, count)
|
values = value.get_tuple(TYPE_INTEGER, count)
|
||||||
for i in range(count):
|
for i in range(count):
|
||||||
self.adjustments[i].set_value(values[i])
|
self.adjustments[i].set_value(values[i])
|
||||||
|
|
||||||
def update_ctl_from_scale(self, adj, index):
|
def update_ctl_from_scale(self, adj, index):
|
||||||
scale_value = adj.get_value()
|
scale_value = adj.get_value()
|
||||||
value_to_set = int(round(adj.get_value()))
|
value_to_set = int(round(adj.get_value()))
|
||||||
count = len(self.adjustments)
|
count = len(self.adjustments)
|
||||||
value = alsahcontrol.Value(self.element)
|
value = alsahcontrol.Value(self.element)
|
||||||
if self.parent.lock_check.get_active():
|
if self.parent.lock_check.get_active():
|
||||||
values = [value_to_set for i in range(count)]
|
values = [value_to_set for i in range(count)]
|
||||||
else:
|
else:
|
||||||
value.read()
|
value.read()
|
||||||
values = value.get_array(TYPE_INTEGER, count)
|
values = value.get_array(TYPE_INTEGER, count)
|
||||||
values[index] = value_to_set
|
values[index] = value_to_set
|
||||||
value.set_array(TYPE_INTEGER, values)
|
value.set_array(TYPE_INTEGER, values)
|
||||||
value.write()
|
value.write()
|
||||||
if value_to_set != scale_value:
|
if value_to_set != scale_value:
|
||||||
adj.set_value(value_to_set)
|
adj.set_value(value_to_set)
|
||||||
|
|
||||||
def get_label(self, info):
|
def get_label(self, info):
|
||||||
pid = self.get_pid(info)
|
pid = self.get_pid(info)
|
||||||
if pid:
|
if pid:
|
||||||
cmdline = self.get_pid_cmdline(pid)
|
cmdline = self.get_pid_cmdline(pid)
|
||||||
if cmdline:
|
if cmdline:
|
||||||
return cmdline
|
return cmdline
|
||||||
else:
|
else:
|
||||||
return "PID %d" % pid
|
return "PID %d" % pid
|
||||||
else:
|
else:
|
||||||
name = info.name
|
name = info.name
|
||||||
if name[-7:] == " Volume":
|
if name[-7:] == " Volume":
|
||||||
name = name[:-7]
|
name = name[:-7]
|
||||||
if name[-9:] == " Playback":
|
if name[-9:] == " Playback":
|
||||||
name = name[:-9]
|
name = name[:-9]
|
||||||
return name
|
return name
|
||||||
|
|
||||||
def get_pid(self, info):
|
def get_pid(self, info):
|
||||||
card = self.parent.current_card
|
card = self.parent.current_card
|
||||||
device = info.device
|
device = info.device
|
||||||
subdevice = info.subdevice
|
subdevice = info.subdevice
|
||||||
if subdevice == 0:
|
if subdevice == 0:
|
||||||
subdevice = info.index
|
subdevice = info.index
|
||||||
filename = "/proc/asound/card%d/pcm%dp/sub%d/status" % (card, device, subdevice)
|
filename = "/proc/asound/card%d/pcm%dp/sub%d/status" % (card, device, subdevice)
|
||||||
try:
|
try:
|
||||||
f = open(filename, "r")
|
with open(filename, "r") as f:
|
||||||
except IOError:
|
for line in f:
|
||||||
return None
|
if line[:9] == "owner_pid":
|
||||||
try:
|
return int(line.split(':')[1].strip())
|
||||||
for line in f.readlines():
|
except IOError:
|
||||||
if line[:9] == "owner_pid":
|
return None
|
||||||
return int(line.split(':')[1].strip())
|
return None
|
||||||
finally:
|
|
||||||
f.close()
|
|
||||||
return None
|
|
||||||
|
|
||||||
def get_pid_cmdline(self, pid):
|
def get_pid_cmdline(self, pid):
|
||||||
try:
|
try:
|
||||||
f = open("/proc/%d/cmdline" % pid, "r")
|
with open("/proc/%d/cmdline" % pid, "r") as f:
|
||||||
except IOError:
|
cmdline = f.read()
|
||||||
return None
|
except IOError:
|
||||||
try:
|
return None
|
||||||
cmdline = f.read()
|
return cmdline.replace('\x00', ' ').strip()
|
||||||
finally:
|
|
||||||
f.close()
|
|
||||||
return cmdline.replace('\x00', ' ').strip()
|
|
||||||
|
|
||||||
class MixerWindow(gtk.Window):
|
class MixerWindow(Gtk.Window):
|
||||||
card_numbers = alsacard.card_list()
|
card_numbers = alsacard.card_list()
|
||||||
current_card = -1
|
current_card = -1
|
||||||
hcontrol = None
|
hcontrol = None
|
||||||
scales_vbox = None
|
scales_vbox = None
|
||||||
msg_label = None
|
msg_label = None
|
||||||
streams = []
|
streams = []
|
||||||
hctl_sources = []
|
hctl_sources = []
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
gtk.Window.__init__(self)
|
Gtk.Window.__init__(self)
|
||||||
self.connect('destroy', lambda w: gtk.main_quit())
|
self.connect('destroy', lambda w: Gtk.main_quit())
|
||||||
self.set_title("Hardware Mixer Volumes")
|
self.set_title("Hardware Mixer Volumes")
|
||||||
|
|
||||||
vbox = gtk.VBox()
|
vbox = Gtk.Grid()
|
||||||
self.add(vbox)
|
vbox.set_orientation(Gtk.Orientation.VERTICAL)
|
||||||
|
self.add(vbox)
|
||||||
|
|
||||||
hbox = gtk.HBox()
|
hbox = Gtk.Grid()
|
||||||
vbox.pack_start(hbox, expand=False)
|
vbox.add(hbox)
|
||||||
|
|
||||||
label = gtk.Label("_Sound Card: ")
|
label = Gtk.Label.new_with_mnemonic("_Sound Card: ")
|
||||||
label.set_use_underline(True)
|
hbox.add(label)
|
||||||
hbox.pack_start(label, expand=False)
|
|
||||||
|
|
||||||
combo = gtk.combo_box_new_text()
|
combo = Gtk.ComboBoxText()
|
||||||
for i in self.card_numbers:
|
combo.set_hexpand(True)
|
||||||
str = "%d: %s" % (i, alsacard.card_get_name(i))
|
for i in self.card_numbers:
|
||||||
combo.append_text(str)
|
str = "%d: %s" % (i, alsacard.card_get_name(i))
|
||||||
if len(self.card_numbers) > 0:
|
combo.append_text(str)
|
||||||
combo.set_active(0)
|
if len(self.card_numbers) > 0:
|
||||||
combo.connect('changed', lambda c: self.change_card(self.card_numbers[combo.get_active()]))
|
combo.set_active(0)
|
||||||
hbox.pack_start(combo)
|
combo.connect('changed', lambda c: self.change_card(self.card_numbers[combo.get_active()]))
|
||||||
label.set_mnemonic_widget(combo)
|
hbox.add(combo)
|
||||||
|
label.set_mnemonic_widget(combo)
|
||||||
|
|
||||||
self.lock_check = gtk.CheckButton(label="_Lock Channels")
|
self.lock_check = Gtk.CheckButton.new_with_mnemonic(label="_Lock Channels")
|
||||||
self.lock_check.set_active(True)
|
self.lock_check.set_active(True)
|
||||||
vbox.pack_start(self.lock_check, expand=False)
|
vbox.add(self.lock_check)
|
||||||
|
|
||||||
scrollwin = gtk.ScrolledWindow()
|
scrollwin = Gtk.ScrolledWindow()
|
||||||
scrollwin.set_policy(hscrollbar_policy=gtk.POLICY_NEVER, vscrollbar_policy=gtk.POLICY_AUTOMATIC)
|
scrollwin.set_policy(hscrollbar_policy=Gtk.PolicyType.NEVER, vscrollbar_policy=Gtk.PolicyType.AUTOMATIC)
|
||||||
scrollwin.set_shadow_type(gtk.SHADOW_NONE)
|
scrollwin.set_shadow_type(Gtk.ShadowType.NONE)
|
||||||
vbox.pack_start(scrollwin)
|
scrollwin.set_vexpand(True)
|
||||||
|
vbox.add(scrollwin)
|
||||||
|
|
||||||
self.scales_vbox = gtk.VBox()
|
self.scales_vbox = Gtk.Grid()
|
||||||
scrollwin.add_with_viewport(self.scales_vbox)
|
self.scales_vbox.set_orientation(Gtk.Orientation.VERTICAL)
|
||||||
|
scrollwin.add(self.scales_vbox)
|
||||||
|
|
||||||
label = gtk.Label()
|
label = Gtk.Label()
|
||||||
label.set_single_line_mode(True)
|
label.set_single_line_mode(True)
|
||||||
line_height = label.size_request()[1]
|
line_height = max(label.get_size_request().height, 0)
|
||||||
label.destroy()
|
label.destroy()
|
||||||
scale = gtk.HScale()
|
scale = Gtk.Scale(orientation=Gtk.Orientation.HORIZONTAL)
|
||||||
scale.set_draw_value(False)
|
scale.set_draw_value(False)
|
||||||
line_height += scale.size_request()[1]
|
line_height += max(scale.get_size_request().height, 0)
|
||||||
scale.destroy()
|
scale.destroy()
|
||||||
# always have space for at least four sliders
|
# always have space for at least four sliders
|
||||||
scrollwin.set_size_request(width=-1, height=line_height*4+4)
|
scrollwin.set_size_request(width=-1, height=line_height*4+4)
|
||||||
|
|
||||||
# TODO: select the default card or the first card with stream controls
|
# TODO: select the default card or the first card with stream controls
|
||||||
if len(self.card_numbers) > 0:
|
if len(self.card_numbers) > 0:
|
||||||
self.change_card(self.card_numbers[0])
|
self.change_card(self.card_numbers[0])
|
||||||
self.update_msg_label()
|
self.update_msg_label()
|
||||||
|
|
||||||
self.show_all()
|
self.show_all()
|
||||||
|
|
||||||
def change_card(self, cardnum):
|
def change_card(self, cardnum):
|
||||||
for s in self.hctl_sources:
|
for s in self.hctl_sources:
|
||||||
gobject.source_remove(s)
|
GLib.source_remove(s)
|
||||||
self.hctl_sources = []
|
self.hctl_sources = []
|
||||||
|
|
||||||
self.hcontrol = self.open_hcontrol_for_card(cardnum)
|
self.hcontrol = self.open_hcontrol_for_card(cardnum)
|
||||||
|
|
||||||
for s in self.streams:
|
for s in self.streams:
|
||||||
s.destroy()
|
s.destroy()
|
||||||
self.streams = []
|
self.streams = []
|
||||||
|
|
||||||
self.current_card = cardnum
|
self.current_card = cardnum
|
||||||
|
|
||||||
if not self.hcontrol:
|
if not self.hcontrol:
|
||||||
self.update_msg_label()
|
self.update_msg_label()
|
||||||
return
|
return
|
||||||
|
|
||||||
for id in self.hcontrol.list():
|
for id in self.hcontrol.list():
|
||||||
if not self.is_stream_elem(id):
|
if not self.is_stream_elem(id):
|
||||||
continue
|
continue
|
||||||
elem = alsahcontrol.Element(self.hcontrol, id[0])
|
elem = alsahcontrol.Element(self.hcontrol, id[0])
|
||||||
info = alsahcontrol.Info(elem)
|
info = alsahcontrol.Info(elem)
|
||||||
if not self.is_stream_info(info):
|
if not self.is_stream_info(info):
|
||||||
continue
|
continue
|
||||||
stream = Stream(elem, self)
|
stream = Stream(elem, self)
|
||||||
self.streams.append(stream)
|
self.streams.append(stream)
|
||||||
|
|
||||||
for fd,condition in self.hcontrol.poll_fds:
|
for fd,condition in self.hcontrol.poll_fds:
|
||||||
self.hctl_sources.append(gobject.io_add_watch(fd, condition, self.hctl_io_callback))
|
self.hctl_sources.append(GLib.io_add_watch(fd, 0, GLib.IOCondition(condition), self.hctl_io_callback))
|
||||||
|
|
||||||
self.update_msg_label()
|
self.update_msg_label()
|
||||||
|
|
||||||
self.scales_vbox.show_all()
|
self.scales_vbox.show_all()
|
||||||
|
|
||||||
def update_msg_label(self):
|
def update_msg_label(self):
|
||||||
needs_msg = len(self.scales_vbox.get_children()) < 2
|
needs_msg = len(self.scales_vbox.get_children()) < 2
|
||||||
has_msg = self.msg_label
|
has_msg = self.msg_label
|
||||||
if has_msg and not needs_msg:
|
if has_msg and not needs_msg:
|
||||||
self.msg_label.destroy()
|
self.msg_label.destroy()
|
||||||
self.msg_label = None
|
self.msg_label = None
|
||||||
elif needs_msg:
|
elif needs_msg:
|
||||||
if len(self.streams) > 0:
|
if len(self.streams) > 0:
|
||||||
msg = "There are no open streams."
|
msg = "There are no open streams."
|
||||||
else:
|
else:
|
||||||
msg = "This card does not have stream controls."
|
msg = "This card does not have stream controls."
|
||||||
if not has_msg:
|
if not has_msg:
|
||||||
self.msg_label = gtk.Label(msg)
|
self.msg_label = Gtk.Label.new(msg)
|
||||||
self.scales_vbox.pack_start(self.msg_label)
|
self.msg_label.set_vexpand(True)
|
||||||
self.scales_vbox.show_all()
|
self.scales_vbox.add(self.msg_label)
|
||||||
elif self.msg_label.get_text() != msg:
|
self.scales_vbox.show_all()
|
||||||
self.msg_label.set_text(msg)
|
elif self.msg_label.get_text() != msg:
|
||||||
|
self.msg_label.set_text(msg)
|
||||||
|
|
||||||
def open_hcontrol_for_card(self, cardnum):
|
def open_hcontrol_for_card(self, cardnum):
|
||||||
devname = "hw:CARD=" + str(cardnum)
|
devname = "hw:CARD=" + str(cardnum)
|
||||||
try:
|
try:
|
||||||
hc = alsahcontrol.HControl(name=devname,
|
hc = alsahcontrol.HControl(name=devname,
|
||||||
mode=alsahcontrol.open_mode['NONBLOCK'])
|
mode=alsahcontrol.open_mode['NONBLOCK'])
|
||||||
except:
|
except:
|
||||||
# TODO: alsa error msg
|
# TODO: alsa error msg
|
||||||
dlg = gtk.MessageDialog(self,
|
dlg = Gtk.MessageDialog(self,
|
||||||
gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
|
Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT,
|
||||||
gtk.MESSAGE_ERROR, gtk.BUTTONS_OK,
|
Gtk.MessageType.ERROR, Gtk.ButtonsType.OK,
|
||||||
"Cannot open sound card control device.")
|
"Cannot open sound card control device.")
|
||||||
dlg.run()
|
dlg.run()
|
||||||
dlg.destroy()
|
dlg.destroy()
|
||||||
return None
|
return None
|
||||||
return hc
|
return hc
|
||||||
|
|
||||||
def is_stream_elem(self, id):
|
def is_stream_elem(self, id):
|
||||||
return ((id[1] == INTF_PCM and
|
return ((id[1] == INTF_PCM and
|
||||||
id[4] in ("PCM Playback Volume", "EMU10K1 PCM Volume")) or
|
id[4] in ("PCM Playback Volume", "EMU10K1 PCM Volume")) or
|
||||||
(id[1] == INTF_MIXER and
|
(id[1] == INTF_MIXER and
|
||||||
id[4] == "VIA DXS Playback Volume"))
|
id[4] == "VIA DXS Playback Volume"))
|
||||||
|
|
||||||
def is_stream_info(self, info):
|
def is_stream_info(self, info):
|
||||||
return info.is_readable and info.is_writable and info.type == TYPE_INTEGER
|
return info.is_readable and info.is_writable and info.type == TYPE_INTEGER
|
||||||
|
|
||||||
def hctl_io_callback(self, source, condition):
|
def hctl_io_callback(self, source, condition):
|
||||||
self.hcontrol.handle_events()
|
self.hcontrol.handle_events()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
MixerWindow()
|
MixerWindow()
|
||||||
gtk.main()
|
Gtk.main()
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
|
||||||