Changeset 749

Show
Ignore:
Timestamp:
11/30/07 05:23:37 (15 years ago)
Author:
jwoithe
Message:

StreamProcessor::transferSilence(): don't assume event size is one quadlet when allocating dummy buffer - not all interfaces work with a frame size of 1 quadlet.
MOTU: restore test tone to facilitate testing.
StreamProcessor::StreamProcessor?(): re-order initialisations to prevent compiler warnings.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/libstreaming/generic/StreamProcessor.cpp

    r748 r749  
    3636 
    3737StreamProcessor::StreamProcessor(FFADODevice &parent, enum eProcessorType type) 
    38     : m_parent( parent ) 
    39     , m_processor_type ( type ) 
    40     , m_channel( -1 ) 
    41     , m_handler( NULL ) 
     38    : m_processor_type ( type ) 
    4239    , m_state( ePS_Created ) 
    4340    , m_next_state( ePS_Invalid ) 
    4441    , m_cycle_to_switch_state( 0 ) 
     42    , m_parent( parent ) 
     43    , m_channel( -1 ) 
     44    , m_handler( NULL ) 
     45    , m_dropped(0) 
     46    , m_last_timestamp(0) 
     47    , m_last_timestamp2(0) 
    4548    , m_scratch_buffer( NULL ) 
    4649    , m_scratch_buffer_size_bytes( 0 ) 
     
    5053    , m_sync_delay( 0 ) 
    5154    , m_in_xrun( false ) 
    52     , m_last_timestamp(0) 
    53     , m_last_timestamp2(0) 
    54     , m_dropped(0) 
    5555{ 
    5656    // create the timestamped buffer and register ourselves as its client 
     
    14701470 
    14711471    // prepare a buffer of silence 
    1472     char *dummybuffer = (char *)calloc(sizeof(quadlet_t), nframes * getEventsPerFrame()); 
     1472    char *dummybuffer = (char *)calloc(getEventSize(), nframes * getEventsPerFrame()); 
    14731473    transmitSilenceBlock(dummybuffer, nframes, 0); 
    14741474 
  • trunk/libffado/src/libstreaming/motu/MotuTransmitStreamProcessor.cpp

    r748 r749  
    3939#define TRANSMIT_TRANSFER_DELAY DEFAULT_TRANSFER_DELAY 
    4040 
     41// Set to 1 to enable the generation of a 1 kHz test tone in analog output 1 
     42#define TESTTONE 1 
     43 
     44#if TESTTONE 
     45#include <math.h> 
     46#endif 
     47 
    4148namespace Streaming 
    4249{ 
     
    283290        // FIXME: remove this hacked in 1 kHz test signal to 
    284291        // analog-1 when testing is complete. 
    285         signed int int_tpf = (int)ticks_per_frame; 
     292        signed int i, int_tpf = (int)ticks_per_frame; 
    286293        unsigned char *sample = data+8+16; 
    287294        for (i=0; i<n_events; i++, sample+=m_event_size) {