~ubuntu-branches/ubuntu/hardy/lmms/hardy

« back to all changes in this revision

Viewing changes to src/lib/oscillator.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ragwitz
  • Date: 2005-12-22 16:22:50 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051222162250-key3p7x0212jy6dn
Tags: 0.1.2-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * oscillator.cpp - implementation of powerful oscillator-class
3
3
 *
4
 
 * Linux MultiMedia Studio
5
 
 * Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
 
4
 * Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
 
5
 * 
 
6
 * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
6
7
 *
7
8
 * This program is free software; you can redistribute it and/or
8
9
 * modify it under the terms of the GNU General Public
25
26
#include "oscillator.h"
26
27
 
27
28
 
28
 
const sampleFrame zero_frame = { 0.0f, 0.0f };
29
 
 
30
29
 
31
30
oscillator::oscillator( modulationAlgos _modulation_algo, float _freq,
32
31
                                Sint16 _phase_offset, float _volume_factor,
35
34
        m_volumeFactor(_volume_factor),
36
35
        m_phaseOffset(_phase_offset),
37
36
        m_subOsc(_sub_osc),
38
 
        m_userWaveData( &zero_frame ),
 
37
        m_userWaveData( &ZERO_FRAME ),
39
38
        m_userWaveFrames( 1 )
40
39
{
41
40
 
189
188
 
190
189
 
191
190
 
192
 
oscillator * FASTCALL oscillator::createNewOsc( waveShapes _wave_shape,
 
191
oscillator * oscillator::createOsc( waveShapes _wave_shape,
193
192
                                        modulationAlgos _modulation_algo,
194
193
                                        float _freq, Sint16 _phase_offset,
195
194
                                        float _volume_factor,