mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-05 13:30:00 -05:00
Remove sequencer instrument layer
Remove obsoleted sequencer instrument layer from alsa-lib. The old symbols are compiled in as default as dummy functions (unless --disable-old-symbols is given to configure) so that the old binaries can still work more or less.
This commit is contained in:
parent
078112dfdf
commit
54a2cf5ecf
18 changed files with 235 additions and 1784 deletions
|
|
@ -38,10 +38,6 @@ if BUILD_SEQ
|
|||
SUBDIRS += seq
|
||||
libasound_la_LIBADD += seq/libseq.la
|
||||
endif
|
||||
if BUILD_INSTR
|
||||
SUBDIRS += instr
|
||||
libasound_la_LIBADD += instr/libinstr.la
|
||||
endif
|
||||
if BUILD_ALISP
|
||||
SUBDIRS += alisp
|
||||
libasound_la_LIBADD += alisp/libalisp.la
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@ EXTRA_LTLIBRARIES=libseq.la
|
|||
|
||||
libseq_la_SOURCES = seq_hw.c seq.c seq_event.c seqmid.c seq_midi_event.c \
|
||||
seq_symbols.c
|
||||
if KEEP_OLD_SYMBOLS
|
||||
libseq_la_SOURCES += seq_old.c
|
||||
endif
|
||||
noinst_HEADERS = seq_local.h
|
||||
|
||||
all: libseq.la
|
||||
|
|
|
|||
265
src/seq/seq.c
265
src/seq/seq.c
|
|
@ -2178,9 +2178,6 @@ void snd_seq_port_info_set_timestamp_queue(snd_seq_port_info_t *info, int queue)
|
|||
* - #SND_SEQ_PORT_TYPE_MIDI_GS GS compatible device
|
||||
* - #SND_SEQ_PORT_TYPE_MIDI_XG XG compatible device
|
||||
* - #SND_SEQ_PORT_TYPE_MIDI_MT32 MT-32 compatible device
|
||||
* - #SND_SEQ_PORT_TYPE_SYNTH Understands SND_SEQ_EVENT_SAMPLE_xxx messages
|
||||
* - #SND_SEQ_PORT_TYPE_DIRECT_SAMPLE Supports SND_SEQ_EVENT_INSTR_xxx messages sent directly
|
||||
* - #SND_SEQ_PORT_TYPE_SAMPLE Supports SND_SEQ_EVENT_INSTR_xxx messages
|
||||
* - #SND_SEQ_PORT_TYPE_HARDWARE Implemented in hardware
|
||||
* - #SND_SEQ_PORT_TYPE_SOFTWARE Implemented in software
|
||||
* - #SND_SEQ_PORT_TYPE_SYNTHESIZER Generates sound
|
||||
|
|
@ -4684,265 +4681,3 @@ int snd_seq_get_bit(int nr, void *array)
|
|||
{
|
||||
return ((((unsigned int *)array)[nr >> 5]) & (1UL << (nr & 31))) ? 1 : 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* instrument layer
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief get size of #snd_instr_header_t
|
||||
* \return size in bytes
|
||||
*/
|
||||
size_t snd_instr_header_sizeof(void)
|
||||
{
|
||||
return sizeof(snd_instr_header_t);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief allocate an empty #snd_instr_header_t using standard malloc
|
||||
* \param ptr returned pointer
|
||||
* \param len additional data length
|
||||
* \return 0 on success otherwise negative error code
|
||||
*/
|
||||
int snd_instr_header_malloc(snd_instr_header_t **ptr, size_t len)
|
||||
{
|
||||
assert(ptr);
|
||||
*ptr = calloc(1, sizeof(snd_instr_header_t) + len);
|
||||
if (!*ptr)
|
||||
return -ENOMEM;
|
||||
(*ptr)->len = len;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief frees a previously allocated #snd_instr_header_t
|
||||
* \param obj poitner to object to free
|
||||
*/
|
||||
void snd_instr_header_free(snd_instr_header_t *obj)
|
||||
{
|
||||
free(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief copy one #snd_instr_header_t to another
|
||||
* \param dst pointer to destination
|
||||
* \param src pointer to source
|
||||
*/
|
||||
void snd_instr_header_copy(snd_instr_header_t *dst, const snd_instr_header_t *src)
|
||||
{
|
||||
assert(dst && src);
|
||||
*dst = *src;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Get the instrument id of an instr_header container
|
||||
* \param info instr_header container
|
||||
* \return instrument id pointer
|
||||
*/
|
||||
const snd_seq_instr_t *snd_instr_header_get_id(const snd_instr_header_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return &info->id.instr;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Get the cluster id of an instr_header container
|
||||
* \param info instr_header container
|
||||
* \return cluster id
|
||||
*/
|
||||
snd_seq_instr_cluster_t snd_instr_header_get_cluster(const snd_instr_header_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return info->id.cluster;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Get the command of an instr_header container
|
||||
* \param info instr_header container
|
||||
* \return command type
|
||||
*/
|
||||
unsigned int snd_instr_header_get_cmd(const snd_instr_header_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return info->cmd;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Get the length of extra data of an instr_header container
|
||||
* \param info instr_header container
|
||||
* \return the length in bytes
|
||||
*/
|
||||
size_t snd_instr_header_get_len(const snd_instr_header_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return info->len;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Get the data name of an instr_header container
|
||||
* \param info instr_header container
|
||||
* \return the name string
|
||||
*/
|
||||
const char *snd_instr_header_get_name(const snd_instr_header_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return info->data.name;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Get the data type of an instr_header container
|
||||
* \param info instr_header container
|
||||
* \return the data type
|
||||
*/
|
||||
int snd_instr_header_get_type(const snd_instr_header_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return info->data.type;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Get the data format of an instr_header container
|
||||
* \param info instr_header container
|
||||
* \return the data format string
|
||||
*/
|
||||
const char *snd_instr_header_get_format(const snd_instr_header_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return info->data.data.format;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Get the data alias of an instr_header container
|
||||
* \param info instr_header container
|
||||
* \return the data alias id
|
||||
*/
|
||||
const snd_seq_instr_t *snd_instr_header_get_alias(const snd_instr_header_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return &info->data.data.alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Get the extra data pointer of an instr_header container
|
||||
* \param info instr_header container
|
||||
* \return the extra data pointer
|
||||
*/
|
||||
void *snd_instr_header_get_data(const snd_instr_header_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return (void*)((char*)info + sizeof(*info));
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Get the flag to follow alias of an instr_header container
|
||||
* \param info instr_header container
|
||||
* \return 1 if follow alias
|
||||
*/
|
||||
int snd_instr_header_get_follow_alias(const snd_instr_header_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return (info->flags & SNDRV_SEQ_INSTR_QUERY_FOLLOW_ALIAS) ? 1 : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Set the instrument id of an instr_header container
|
||||
* \param info instr_header container
|
||||
* \param id instrument id pointer
|
||||
*/
|
||||
void snd_instr_header_set_id(snd_instr_header_t *info, const snd_seq_instr_t *id)
|
||||
{
|
||||
assert(info && id);
|
||||
info->id.instr = *id;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Set the cluster id of an instr_header container
|
||||
* \param info instr_header container
|
||||
* \param cluster cluster id
|
||||
*/
|
||||
void snd_instr_header_set_cluster(snd_instr_header_t *info, snd_seq_instr_cluster_t cluster)
|
||||
{
|
||||
assert(info);
|
||||
info->id.cluster = cluster;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Set the command of an instr_header container
|
||||
* \param info instr_header container
|
||||
* \param cmd command type
|
||||
*/
|
||||
void snd_instr_header_set_cmd(snd_instr_header_t *info, unsigned int cmd)
|
||||
{
|
||||
assert(info);
|
||||
info->cmd = cmd;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Set the length of extra data of an instr_header container
|
||||
* \param info instr_header container
|
||||
* \param len size of extra data in bytes
|
||||
*/
|
||||
void snd_instr_header_set_len(snd_instr_header_t *info, size_t len)
|
||||
{
|
||||
assert(info);
|
||||
info->len = len;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Set the data name of an instr_header container
|
||||
* \param info instr_header container
|
||||
* \param name the name string
|
||||
*/
|
||||
void snd_instr_header_set_name(snd_instr_header_t *info, const char *name)
|
||||
{
|
||||
assert(info && name);
|
||||
strncpy(info->data.name, name, sizeof(info->data.name));
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Set the data type of an instr_header container
|
||||
* \param info instr_header container
|
||||
* \param type the data type
|
||||
*/
|
||||
void snd_instr_header_set_type(snd_instr_header_t *info, int type)
|
||||
{
|
||||
assert(info);
|
||||
info->data.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Set the data format of an instr_header container
|
||||
* \param info instr_header container
|
||||
* \param format the data format string
|
||||
*/
|
||||
void snd_instr_header_set_format(snd_instr_header_t *info, const char *format)
|
||||
{
|
||||
assert(info && format);
|
||||
strncpy(info->data.data.format, format, sizeof(info->data.data.format));
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Set the data alias id of an instr_header container
|
||||
* \param info instr_header container
|
||||
* \param instr alias instrument id
|
||||
*/
|
||||
void snd_instr_header_set_alias(snd_instr_header_t *info, const snd_seq_instr_t *instr)
|
||||
{
|
||||
assert(info && instr);
|
||||
info->data.data.alias = *instr;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Set the flag to follow alias of an instr_header container
|
||||
* \param info instr_header container
|
||||
* \param val 1 if follow alias
|
||||
*/
|
||||
void snd_instr_header_set_follow_alias(snd_instr_header_t *info, int val)
|
||||
{
|
||||
assert(info);
|
||||
if (val)
|
||||
info->flags |= SNDRV_SEQ_INSTR_QUERY_FOLLOW_ALIAS;
|
||||
else
|
||||
info->flags &= ~SNDRV_SEQ_INSTR_QUERY_FOLLOW_ALIAS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,12 +37,8 @@ const unsigned int snd_seq_event_types[256] = {
|
|||
= FIXED_EV(SND_SEQ_EVFLG_MESSAGE),
|
||||
[SND_SEQ_EVENT_PORT_SUBSCRIBED ... SND_SEQ_EVENT_PORT_UNSUBSCRIBED]
|
||||
= FIXED_EV(SND_SEQ_EVFLG_CONNECTION),
|
||||
[SND_SEQ_EVENT_SAMPLE ... SND_SEQ_EVENT_SAMPLE_PRIVATE1]
|
||||
= FIXED_EV(SND_SEQ_EVFLG_SAMPLE),
|
||||
[SND_SEQ_EVENT_USR0 ... SND_SEQ_EVENT_USR9]
|
||||
= FIXED_EV(SND_SEQ_EVFLG_RAW) | FIXED_EV(SND_SEQ_EVFLG_USERS),
|
||||
[SND_SEQ_EVENT_INSTR_BEGIN ... SND_SEQ_EVENT_INSTR_CHANGE]
|
||||
= _SND_SEQ_TYPE(SND_SEQ_EVFLG_INSTR) | _SND_SEQ_TYPE(SND_SEQ_EVFLG_VARUSR),
|
||||
[SND_SEQ_EVENT_SYSEX ... SND_SEQ_EVENT_BOUNCE]
|
||||
= _SND_SEQ_TYPE(SND_SEQ_EVFLG_VARIABLE),
|
||||
[SND_SEQ_EVENT_USR_VAR0 ... SND_SEQ_EVENT_USR_VAR4]
|
||||
|
|
|
|||
222
src/seq/seq_old.c
Normal file
222
src/seq/seq_old.c
Normal file
|
|
@ -0,0 +1,222 @@
|
|||
/*
|
||||
* place-holders to keep libasound linkable to old binaries
|
||||
*/
|
||||
|
||||
#ifndef DOXYGEN
|
||||
|
||||
#include "local.h"
|
||||
|
||||
size_t snd_instr_header_sizeof(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int snd_instr_header_malloc(void **ptr ATTRIBUTE_UNUSED,
|
||||
size_t len ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
void snd_instr_header_free(void *obj ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void snd_instr_header_copy(void *dst ATTRIBUTE_UNUSED,
|
||||
const void *src ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
const void *snd_instr_header_get_id(const void *info ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int snd_instr_header_get_cluster(const void *info ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned int snd_instr_header_get_cmd(const void *info ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t snd_instr_header_get_len(const void *info ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *snd_instr_header_get_name(const void *info ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int snd_instr_header_get_type(const void *info ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *snd_instr_header_get_format(const void *info ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const void *snd_instr_header_get_alias(const void *info ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void *snd_instr_header_get_data(const void *info ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int snd_instr_header_get_follow_alias(const void *info ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void snd_instr_header_set_id(void *info ATTRIBUTE_UNUSED,
|
||||
const void *id ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void snd_instr_header_set_cluster(void *info ATTRIBUTE_UNUSED,
|
||||
int cluster ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void snd_instr_header_set_cmd(void *info ATTRIBUTE_UNUSED,
|
||||
unsigned int cmd ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void snd_instr_header_set_len(void *info ATTRIBUTE_UNUSED,
|
||||
size_t len ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void snd_instr_header_set_name(void *info ATTRIBUTE_UNUSED,
|
||||
const char *name ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void snd_instr_header_set_type(void *info ATTRIBUTE_UNUSED,
|
||||
int type ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void snd_instr_header_set_format(void *info ATTRIBUTE_UNUSED,
|
||||
const char *format ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void snd_instr_header_set_alias(void *info ATTRIBUTE_UNUSED,
|
||||
const void *instr ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void snd_instr_header_set_follow_alias(void *info ATTRIBUTE_UNUSED,
|
||||
int val ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
int snd_instr_fm_free(void *fm ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int snd_instr_fm_convert_to_stream(void *fm ATTRIBUTE_UNUSED,
|
||||
const char *name ATTRIBUTE_UNUSED,
|
||||
void **__data ATTRIBUTE_UNUSED,
|
||||
size_t *__size ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
int snd_instr_fm_convert_from_stream(void *__data ATTRIBUTE_UNUSED,
|
||||
size_t size ATTRIBUTE_UNUSED,
|
||||
void **simple ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
|
||||
int snd_instr_iwffff_open(void **handle ATTRIBUTE_UNUSED,
|
||||
const char *name_fff ATTRIBUTE_UNUSED,
|
||||
const char *name_dat ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
int snd_instr_iwffff_open_rom(void **handle ATTRIBUTE_UNUSED,
|
||||
int card ATTRIBUTE_UNUSED,
|
||||
int bank ATTRIBUTE_UNUSED,
|
||||
int file ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
int snd_instr_iwffff_open_rom_file(void **handle ATTRIBUTE_UNUSED,
|
||||
const char *name ATTRIBUTE_UNUSED,
|
||||
int bank ATTRIBUTE_UNUSED,
|
||||
int file ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
int snd_instr_iwffff_close(void *handle ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int snd_instr_iwffff_free(void *__instr ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int snd_instr_iwffff_load(void *iwf ATTRIBUTE_UNUSED,
|
||||
int bank ATTRIBUTE_UNUSED,
|
||||
int prg ATTRIBUTE_UNUSED,
|
||||
void **__iwffff ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
int snd_instr_iwffff_convert_to_stream(void *iwffff ATTRIBUTE_UNUSED,
|
||||
const char *name ATTRIBUTE_UNUSED,
|
||||
void **__data ATTRIBUTE_UNUSED,
|
||||
size_t *__size ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
int snd_instr_iwffff_convert_from_stream(void *data ATTRIBUTE_UNUSED,
|
||||
size_t size ATTRIBUTE_UNUSED,
|
||||
void **iwffff ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
|
||||
int snd_instr_simple_free(void *simple ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int snd_instr_simple_convert_to_stream(void *simple ATTRIBUTE_UNUSED,
|
||||
const char *name ATTRIBUTE_UNUSED,
|
||||
void **__data ATTRIBUTE_UNUSED,
|
||||
size_t *__size ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
int snd_instr_simple_convert_from_stream(void *__data ATTRIBUTE_UNUSED,
|
||||
size_t size ATTRIBUTE_UNUSED,
|
||||
void **simple ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
#endif /* !DOXYGEN */
|
||||
Loading…
Add table
Add a link
Reference in a new issue