Loading...
Searching...
No Matches
Programmable tone detector
Public API functions » Port initialisation » Card information » Port control » Event handling » Audio play and record » Error handling » Programmable tone generator

More information on the libvpb programmable tone detector is available here. More...

Collaboration diagram for Programmable tone detector:

## Topics

| Timer functions
| Locale selection
| Wav audio support

## Classes

struct | VPB_STRAN
| Cadence state transition data for `VPB_DETECT`. More...
struct | VPB_DETECT
| Container for programmable tone detector parameters. More...
struct | VPB_VOX

## Functions

int WINAPI | vpb_setvox (int handle, VPB_VOX *vox)
int WINAPI | vpb_getvox (int handle, VPB_VOX *vox)
int WINAPI | vpb_adpcm_open (void **adpcm)
void WINAPI | vpb_adpcm_reset (void *adpcm)
void WINAPI | vpb_adpcm_close (void *adpcm)
int WINAPI | vpb_adpcm_encode (void *adpcm, char adpcmbuf[], unsigned short *nadpcmbytes, short linearbuf[], unsigned short nlinear)
int WINAPI | vpb_adpcm_decode (void *adpcm, short linearbuf[], unsigned short *nlinear, char adpcmbuf[], unsigned short nadpcmbytes)

## General limits

enum | ToneStateTransition { VPB_TIMER = 0 , VPB_RISING = 1 , VPB_FALLING = 2 , VPB_DELAY = 3 }
| Tone detector state transition types.
#define | VPB_MD 10
| The maximum number of tone detectors per device.
#define | VPB_MS 10
| The maximum number of cadence states to match.

## Tone masks

void WINAPI | vpb_settonedet (VPBPortHandle handle, const VPB_DETECT &d)
| Set or change the parameters for a tone to detect on some port.
void WINAPI | vpb_settonedet (VPBPortHandle handle, const VPB_DETECT *d)
| Set or change the parameters for a tone to detect on some port.
void WINAPI | vpb_gettonedet (VPBPortHandle handle, int id, VPB_DETECT *d)
| Set or change the parameters for a tone to detect on some port.
void WINAPI | vpb_deltonedet (VPBPortHandle handle, const VPB_DETECT &d)
| Revove a tone detector from some port.
void WINAPI | vpb_deltonedet (VPBPortHandle handle, const VPB_DETECT *d)
| Set or change the parameters for a tone to detect on some port.
int WINAPI | vpb_debug_tonedet (VPBPortHandle handle, int id, char file_name[], int sec)
| Set or change the parameters for a tone to detect on some port.
int WINAPI | vpb_enable_tone_event (VPBPortHandle handle, unsigned long mask)
| Enable the `TONE` events specified by mask for handle.
int WINAPI | vpb_disable_tone_event (VPBPortHandle handle, unsigned long mask)
| Disable the `TONE` events specified by mask for handle.
unsigned long WINAPI | vpb_get_tone_event_mask (VPBPortHandle handle)
| Return the current `TONE` event mask for handle.
int WINAPI | vpb_set_tone_event_mask (VPBPortHandle handle, unsigned long mask)
| Set the `TONE` event mask. The previous mask value will be overwritten.
#define | VPB_MDIAL (1<<VPB_DIAL)
| Set or change the parameters for a tone to detect on some port.
#define | VPB_MRINGBACK (1<<VPB_RINGBACK)
| Set or change the parameters for a tone to detect on some port.
#define | VPB_MBUSY (1<<VPB_BUSY)
| Set or change the parameters for a tone to detect on some port.
#define | VPB_MGRUNT (1<<VPB_GRUNT)
| Set or change the parameters for a tone to detect on some port.
#define | VPB_MRINGBACK_308 (1<<VPB_RINGBACK_308)
| Set or change the parameters for a tone to detect on some port.
#define | VPB_MBUSY_308 (1<<VPB_BUSY_308)
| Set or change the parameters for a tone to detect on some port.
#define | VPB_MFAX (1<<VPB_FAX)
| Set or change the parameters for a tone to detect on some port.
#define | VPB_MBUSY_AUST (1<<VPB_BUSY_AUST)
| Set or change the parameters for a tone to detect on some port.
#define | VPB_MRINGBACK_AUS (1<<VPB_RINGBACK_AUS)
| Set or change the parameters for a tone to detect on some port.
#define | VPB_MSPARE9 (1<<VPB_SPARE9)
| Set or change the parameters for a tone to detect on some port.
#define | VPB_MALL_TONES ((unsigned long)-1)
| Set or change the parameters for a tone to detect on some port.

## Built in tone dectector ID's

#define | VPB_DIAL 0
| dial tone detected (US/Aust/sudio308)
#define | VPB_RINGBACK 1
| ringback detected (US)
#define | VPB_BUSY 2
| busy tone detected (US)
#define | VPB_GRUNT 3
| grunt detected
#define | VPB_RINGBACK_308 4
| ringback detected (studio 308)
#define | VPB_BUSY_308 5
| busy tone detected (studio 308)
#define | VPB_FAX 6
| fax CNG tone/preamble
#define | VPB_BUSY_AUST 7
| busy/disconnect tone detected (Australia)
#define | VPB_RINGBACK_AUS 8
| ringback detected (Australia)
#define | VPB_SPARE9 9
| Spare.

## Detailed Description

More information on the libvpb programmable tone detector is available here.

## Function Documentation

## vpb_disable_tone_event()

int WINAPI vpb_disable_tone_event | ( | VPBPortHandle | handle,
|  | unsigned long | mask )

Disable the `TONE` events specified by mask for handle.

Events not included in the mask are unaffected.

References CheckHandle(), and vpb_dev.

## vpb_enable_tone_event()

int WINAPI vpb_enable_tone_event | ( | VPBPortHandle | handle,
|  | unsigned long | mask )

Enable the `TONE` events specified by mask for handle.

Events not included in the mask are unaffected.

References CheckHandle(), and vpb_dev.