示例#1
0
SoundPlayer::SoundAction::SoundAction(const SoundPlayer::SoundAction & b) {
    // Copy fields from the target.
    time = b.time;
    latency = b.latency;
    player = b.getPlayer();
    assetname = b.assetname;
}
示例#2
0
SoundPlayer::SoundAction::SoundAction(const SoundPlayer::SoundAction & b) {
    // Copy fields from the target.
    time = b.time;
    latency = b.latency;
    player = b.getPlayer();
    if (b.buffer) {
        // Increment reference counter for the buffer.
        refCount = b.refCount;
        buffer = b.buffer;
        size = b.size;
        *refCount++;
    } else {
        buffer = NULL;
    }  
}