Skip to content

FloatToInt

Discussion

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

This module converts 32-bit floating-point values to 32-bit integer values. The module has N input and N output pins, and the size of the ith output pin must equal the size of the ith input pin.

Floating-point values outside of the allowable integer range are clipped.

When bypassed the module is still active and continues to perform the conversion.

Module Pack

Deprecated

ClassID

classID = 2013

Type Definition

typedef struct _ModuleFloatToInt
{
ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
} ModuleFloatToIntClass;

Pins

Input Pins

Name in1
Description Input signal
Data type float
Channel range Unrestricted
Block size range Unrestricted
Sample rate range Unrestricted
Complex support Real

Output Pins

Name out1
Description Output signal
Data Type int

Matlab Usage

File Name: float_to_int_module.m 
 M=float_to_int_module(NAME, NUMPINS) 
 Creates a floating point to integer conversion module for use with the 
 Audio Weaver environment.   

 Arguments:  
    NAME - name of the module. 
    NUMPINS - an optional argument allows you to specify the number of 
         input and output pins. By default, NUMPINS=1. 

Copyright (c) 2026 DSP Concepts, Inc.