Update of /cvsroot/alsa/alsa-lib/src/seq In directory sc8-pr-cvs1:/tmp/cvs-serv5504
Modified Files: seq.c seq_hw.c Log Message: - added auto-timestamp mode for the port. snd_seq_port_info_get/set_timestamping() snd_seq_port_info_get/set_timestamp_real() snd_seq_port_info_get/set_timestamp_queue() - increased the protocol version to 1.0.1. Index: seq.c =================================================================== RCS file: /cvsroot/alsa/alsa-lib/src/seq/seq.c,v retrieving revision 1.83 retrieving revision 1.84 diff -u -r1.83 -r1.84 --- seq.c 30 Nov 2002 09:47:21 -0000 1.83 +++ seq.c 25 Jul 2003 17:24:43 -0000 1.84 @@ -1061,6 +1061,39 @@ } /** + * \brief Get the time-stamping mode of the given port in a port_info container + * \param info port_info container + * \return 1 if the port updates timestamps of incoming events + */ +int snd_seq_port_info_get_port_timestamping(const snd_seq_port_info_t *info) +{ + assert(info); + return (info->flags & SNDRV_SEQ_PORT_FLG_TIMESTAMP) ? 1 : 0; +} + +/** + * \brief Get whether the time-stamping of the given port is real-time mode + * \param info port_info container + * \return 1 if the time-stamping is in the real-time mode + */ +int snd_seq_port_info_get_port_timestamp_real(const snd_seq_port_info_t *info) +{ + assert(info); + return (info->flags & SNDRV_SEQ_PORT_FLG_TIME_REAL) ? 1 : 0; +} + +/** + * \brief Get the queue id to update timestamps + * \param info port_info container + * \return the queue id to get the timestamps + */ +int snd_seq_port_info_get_port_timestamp_queue(const snd_seq_port_info_t *info) +{ + assert(info); + return info->time_queue; +} + +/** * \brief Set the client id of a port_info container * \param info port_info container * \param client client id @@ -1171,6 +1204,45 @@ info->flags |= SNDRV_SEQ_PORT_FLG_GIVEN_PORT; else info->flags &= ~SNDRV_SEQ_PORT_FLG_GIVEN_PORT; +} + +/** + * \brief Set the time-stamping mode of the given port + * \param info port_info container + * \param enable non-zero if updating the timestamps of incoming events + */ +void snd_seq_port_info_set_port_timestamping(snd_seq_port_info_t *info, int enable) +{ + assert(info); + if (enable) + info->flags |= SNDRV_SEQ_PORT_FLG_TIMESTAMP; + else + info->flags &= ~SNDRV_SEQ_PORT_FLG_TIMESTAMP; +} + +/** + * \brief Set whether the timestime is updated in the real-time mode + * \param info port_info container + * \param enable non-zero if updating the timestamps in real-time mode + */ +void snd_seq_port_info_set_port_timestamp_real(snd_seq_port_info_t *info, int enable) +{ + assert(info); + if (enable) + info->flags |= SNDRV_SEQ_PORT_FLG_TIME_REAL; + else + info->flags &= ~SNDRV_SEQ_PORT_FLG_TIME_REAL; +} + +/** + * \brief Set the queue id for timestamping + * \param info port_info container + * \param queue the queue id to get timestamps + */ +void snd_seq_port_info_set_port_timestamp_queue(snd_seq_port_info_t *info, int queue) +{ + assert(info); + info->time_queue = queue; } Index: seq_hw.c =================================================================== RCS file: /cvsroot/alsa/alsa-lib/src/seq/seq_hw.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- seq_hw.c 25 Jul 2003 17:02:05 -0000 1.21 +++ seq_hw.c 25 Jul 2003 17:24:43 -0000 1.22 @@ -31,7 +31,7 @@ #define SNDRV_FILE_SEQ "/dev/snd/seq" #define SNDRV_FILE_ALOADSEQ "/dev/aloadSEQ" -#define SNDRV_SEQ_VERSION_MAX SNDRV_PROTOCOL_VERSION(1, 0, 0) +#define SNDRV_SEQ_VERSION_MAX SNDRV_PROTOCOL_VERSION(1, 0, 1) typedef struct { int fd; ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog