Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Kiste
xwax
Commits
4b7509f1
Commit
4b7509f1
authored
May 18, 2014
by
Mark Hills
Browse files
A dummy deck for testing
parent
9938300e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
4b7509f1
...
...
@@ -50,6 +50,7 @@ OBJS = controller.o \
cues.o
\
deck.o
\
device.o
\
dummy.o
\
excrate.o
\
external.o
\
index.o
\
...
...
dummy.c
0 → 100644
View file @
4b7509f1
/*
* Copyright (C) 2014 Mark Hills <mark@xwax.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2, as published by the Free Software Foundation.
*
* 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 version 2 for more details.
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
*/
#include
"dummy.h"
static
unsigned
int
sample_rate
(
struct
device
*
d
)
{
return
48000
;
}
static
struct
device_ops
dummy_ops
=
{
.
sample_rate
=
sample_rate
,
};
void
dummy_init
(
struct
device
*
d
)
{
device_init
(
d
,
&
dummy_ops
);
}
dummy.h
0 → 100644
View file @
4b7509f1
/*
* Copyright (C) 2014 Mark Hills <mark@xwax.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2, as published by the Free Software Foundation.
*
* 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 version 2 for more details.
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
*/
#ifndef DUMMY_H
#define DUMMY_H
#include
"device.h"
void
dummy_init
(
struct
device
*
d
);
#endif
xwax.1
View file @
4b7509f1
...
...
@@ -79,6 +79,11 @@ Use the given importer executable for subsequent decks.
.B \-s \fIpath\fR
Use the given scanner executable to scan subsequent music libraries.
.TP
.B \-\-dummy
Create a deck which is not connected to any audio device, used
for testing.
.TP
.B \-k
Lock into RAM any memory required for real-time use.
...
...
xwax.c
View file @
4b7509f1
...
...
@@ -30,6 +30,7 @@
#include
"controller.h"
#include
"device.h"
#include
"dicer.h"
#include
"dummy.h"
#include
"interface.h"
#include
"jack.h"
#include
"library.h"
...
...
@@ -95,7 +96,8 @@ static void usage(FILE *fd)
" -u Allow all operations when playing
\n
"
" --line Line level signal (default)
\n
"
" --phono Tolerate cartridge level signal ('software pre-amp')
\n
"
" -i <program> Importer (default '%s')
\n\n
"
,
" -i <program> Importer (default '%s')
\n
"
" --dummy Build a dummy deck with no audio device
\n\n
"
,
DEFAULT_IMPORTER
);
#ifdef WITH_OSS
...
...
@@ -383,6 +385,20 @@ int main(int argc, char *argv[])
argv
+=
2
;
argc
-=
2
;
}
else
if
(
!
strcmp
(
argv
[
0
],
"--dummy"
))
{
struct
device
*
v
;
v
=
start_deck
(
"dummy"
);
if
(
v
==
NULL
)
return
-
1
;
dummy_init
(
v
);
commit_deck
();
argv
++
;
argc
--
;
}
else
if
(
!
strcmp
(
argv
[
0
],
"-t"
))
{
/* Set the timecode definition to use */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment