Skip to content

RawStreamingSource

Discussion

THIS MODULE IS DEPRECATED AND NOT RECOMMENDED FOR NEW DESIGNS. PLEASE USE THE Source MODULE INSTEAD.

This module works in conjuction with an upstream data streaming module. The module reads data out of the streaming module's circular buffer and outputs this one block at a time. At instantiation time, you must specify the size, sample rate, and data type of the output pin. The module starts pulling data out of the streaming module once the isReady flag is set to 1.

The module keeps track of the number of times that there was not enough souce data to yield an entire output block. The variable, underflowCount is incremented by 1 whenever a full block of data cannot be output. underflowCount increments at the block rate.

Module Pack

Deprecated

ClassID

classID = 2034

Type Definition

typedef struct _ModuleRawStreamingSource
{
ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
INT32 underflowCount;                         // Number of output samples that could not be serviced.
INT32 streamingObjectID;                      // Object ID of the upstream module
void * streamingObjectPtr;                    // Points to the upstream module
} ModuleRawStreamingSourceClass;

Variables

Properties

Name Type Usage isHidden Default Value Range Units
underflowCount int state 0 0 Unrestricted
streamingObjectID int state 1 -1 Unrestricted
streamingObjectPtr void * state 1 Unrestricted

Pins

Input Pins

Name ID
Description audio input
Data type int
Channel range 1
Block size range 1
Sample rate range Unrestricted
Complex support Real

Output Pins

Name out
Description output data
Data Type fract32

Matlab Usage

File Name: raw_streaming_source_module.m 
 M=raw_streaming_source_module(NAME, NUMCHANNELS, BLOCKSIZE, SAMPLERATE, DATATYPE) 
 Creates a source module that connects to a streaming buffer module and 
 outputs blocks of data.   

 Arguments: 
    NAME - name of the module. 
    NUMCHANNELS - number of interleaved channels in each output pin. 
         By default, NUMCHANNELS=1. 
    BLOCKSIZE - number of samples per output channel.   
         By default, BLOCKSIZE=32. 
    SAMPLERATE - sample rate of the output signal, in Hz.   
         By default, SAMPLERATE=48000. 
    DATATYPE - string specifying the data type.   
         By default, DATATYPE='float'. 

Copyright (c) 2026 DSP Concepts, Inc.