Switch to unified view

a/sc2src/rcvqueue.h b/sc2src/rcvqueue.h
...
...
71
class AudioEater {
71
class AudioEater {
72
public:
72
public:
73
    enum BOrder {BO_MSB, BO_LSB, BO_HOST};
73
    enum BOrder {BO_MSB, BO_LSB, BO_HOST};
74
    struct Context {
74
    struct Context {
75
        Context(WorkQueue<AudioMessage*> *q) : queue(q) {}
75
        Context(WorkQueue<AudioMessage*> *q) : queue(q) {}
76
        WorkQueue<AudioMessage*> *queue;
76
        WorkQueue<AudioMessage*> *queue{nullptr};
77
        ConfSimple *config;
77
        ConfSimple *config{nullptr};
78
    };
78
    };
79
79
80
    // Constructor called by downstream module to set its params
80
    // Constructor called by downstream module to set its params
81
    AudioEater(BOrder o, void *(*w)(void *))
81
    AudioEater(BOrder o, void *(*w)(void *))
82
        : input_border(o), worker(w) {
82
        : input_border(o), worker(w) {
...
...
84
84
85
    BOrder input_border;
85
    BOrder input_border;
86
    /** Worker routine for fetching bufs from the rcvqueue and sending them
86
    /** Worker routine for fetching bufs from the rcvqueue and sending them
87
     * further. The param is actually an AudioEater::Context */
87
     * further. The param is actually an AudioEater::Context */
88
    void *(*worker)(void *);
88
    void *(*worker)(void *);
89
90
    /** Packet counter. This is only used from the watcher thread to
91
       detect activity/inactivity, by polling every few seconds, so no
92
       need to guard against wraparounds */
93
    unsigned int pktcounter{0};
89
};
94
};
90
95
91
extern void copyswap(unsigned char *dest, const unsigned char *src, 
96
extern void copyswap(unsigned char *dest, const unsigned char *src, 
92
                     unsigned int bytes, unsigned int bits);
97
                     unsigned int bytes, unsigned int bits);
93
98
94
extern AudioEater httpAudioEater;
99
extern AudioEater httpAudioEater;
95
extern AudioEater alsaAudioEater;
100
extern AudioEater alsaAudioEater;
96
101
/* Used by the watcher to close alsa on inactivity if configured to do
102
   so. The watcher is only used with alsadirect, and we should move
103
   this to alsadirect.h (if it existed...) */
104
extern void alsa_close();
105
    
97
#endif /* _RCVQUEUE_H_INCLUDED_ */
106
#endif /* _RCVQUEUE_H_INCLUDED_ */