Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ audio_convert(3) — SunOS 5.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

audio_ulaw2linear(3)

audio_convert(3)

NAME

audio_convert, audio_c2d, audio_d2c, audio_d2s, audio_d2l, audio_s2d, audio_l2d − floating-point data conversions

SYNOPSIS

#include <multimedia/libaudio.h>

char audio_d2c(double dbl);

short audio_d2s(double dbl);

long audio_d2l(double dbl);

double audio_c2d(char pcm);

double audio_s2d(short pcm);

double audio_l2d(long pcm);

DESCRIPTION

These macros are designed to facilitate conversion between integer and floating-point PCM audio data. 

audio_c2d(), audio_s2d(), and audio_l2d() convert 8, 16, and 32 bit PCM signed integers to floating-point values that range between −1. and +1.  In order to preserve symmetry around 0, the singular value represented by the most negative integer (that is, −128, −32768, −2147483648) is clipped to −1. 

audio_d2c(), audio_d2s(), and audio_d2l() convert floating-point data to PCM signed integers of 8, 16, or 32 bit precision, respectively.  Floating-point values outside the range of ±1. are clipped at full range in the appropriate precision. 

SEE ALSO

audio_ulaw2linear(3)

WARNINGS

The manual pages, header files, and object library associated with /usr/demo/SOUND/libaudio.a are furnished on an as is basis as a preliminary interface to several useful audio data-processing capabilities.  A future release of the operating system may redefine the syntax or semantics of some of the functions described herein. 

Sun Microsystems  —  Last change: 27 Sep 1991

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026