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

« back to all changes in this revision

Viewing changes to src/core/note.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2007-12-13 15:18:02 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20071213151802-f0my03t6wq0pzaci
Tags: 0.3.1-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Remove libwine-dev alternative in the Build-Depends.
  - Update maintainer field as per spec.

Show diffs side-by-side

added added

removed removed

Lines of Context:
177
177
 
178
178
 
179
179
 
180
 
midiTime note::quantized( const midiTime & _m, const int _q_grid )
 
180
midiTime note::quantized( const midiTime & _m, const int _q_grid,
 
181
                                                        const float _align )
181
182
{
182
 
        float p = ( (float) _m / _q_grid );
183
 
        if( p - floorf( p ) < 0.5f )
 
183
        const float p = ( (float) _m / _q_grid );
 
184
        if( p - floorf( p ) < _align )
184
185
        {
185
186
                return( static_cast<int>( p ) * _q_grid );
186
187
        }