mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-06 04:06:34 -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
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue