@@ -927,30 +927,32 @@ extern void hal_port_wait_writable(hal_port_t** port, unsigned count, sig_atomic
927927#endif
928928
929929
930-
931-
932-
933-
934- union hal_stream_data {
935- real_t f ;
936- bool b ;
937- int32_t s ;
938- uint32_t u ;
939- };
940-
941- struct hal_stream_shm ; // Forward declaration. Only relevant in hal_lib.c.
942- typedef struct {
943- int comp_id , shmem_id ;
944- struct hal_stream_shm * fifo ;
945- } hal_stream_t ;
946-
947930/**
948931 * HAL streams are modeled after sampler/stream and will hopefully replace
949932 * the independent implementations there.
950933 *
951934 * There may only be one reader and one writer but this is not enforced
952935 */
953936
937+ typedef union hal_stream_data {
938+ real_t f ;
939+ bool b ;
940+ rtapi_s32 s ;
941+ rtapi_u32 u ;
942+ rtapi_s64 l ;
943+ rtapi_u64 k ;
944+ } hal_stream_data_u ;
945+ typedef hal_stream_data_u * hal_stream_data_ptr_u ;
946+
947+ struct __hal_stream_shm_t ; // Forward declaration. Only relevant in hal_lib.c.
948+
949+ typedef struct __hal_stream_t {
950+ int comp_id ;
951+ int shmem_id ;
952+ struct __hal_stream_shm_t * fifo ;
953+ } hal_stream_t ;
954+ typedef hal_stream_t * hal_stream_ptr_t ;
955+
954956#define HAL_STREAM_MAX_PINS (21)
955957/** create and attach a stream */
956958extern int hal_stream_create (hal_stream_t * stream , int comp , int key , unsigned depth , const char * typestring );
@@ -967,7 +969,7 @@ extern int hal_stream_element_count(hal_stream_t *stream);
967969extern hal_type_t hal_stream_element_type (hal_stream_t * stream , int idx );
968970
969971// only one reader and one writer is allowed.
970- extern int hal_stream_read (hal_stream_t * stream , union hal_stream_data * buf , unsigned * sampleno );
972+ extern int hal_stream_read (hal_stream_t * stream , hal_stream_data_u * buf , unsigned * sampleno );
971973extern bool hal_stream_readable (hal_stream_t * stream );
972974extern int hal_stream_depth (hal_stream_t * stream );
973975extern unsigned hal_stream_maxdepth (hal_stream_t * stream );
@@ -977,7 +979,7 @@ extern int hal_stream_num_overruns(hal_stream_t *stream);
977979extern void hal_stream_wait_readable (hal_stream_t * stream , sig_atomic_t * stop );
978980#endif
979981
980- extern int hal_stream_write (hal_stream_t * stream , union hal_stream_data * buf );
982+ extern int hal_stream_write (hal_stream_t * stream , hal_stream_data_u * buf );
981983extern bool hal_stream_writable (hal_stream_t * stream );
982984#ifdef ULAPI
983985extern void hal_stream_wait_writable (hal_stream_t * stream , sig_atomic_t * stop );
0 commit comments