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

« back to all changes in this revision

Viewing changes to include/effect_lib.h

  • 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:
444
444
                        m_wideCoeff( _wide_coeff )
445
445
                {
446
446
                }
 
447
                
 
448
                // Lou's Hack
 
449
                void setWideCoeff( const float _wideCoeff )
 
450
                {
 
451
                        m_wideCoeff = _wideCoeff;
 
452
                }
 
453
                
 
454
                int getWideCoeff()
 
455
                {
 
456
                        return m_wideCoeff;
 
457
                }
 
458
                // -----------
447
459
 
448
460
                virtual void nextSample( SAMPLE & _in_left,
449
461
                                                SAMPLE & _in_right ) const
450
462
                {
 
463
                        /*
451
464
                        const float delta = ( _in_left -
452
465
                                ( _in_left+_in_right ) / 2.0f ) * m_wideCoeff;
453
466
                        _in_left += delta;
454
467
                        _in_right -= delta;
 
468
                        */
 
469
 
 
470
                        
 
471
                        // Lou's Hack
 
472
                        // I really can't tell you why this math works, but it sounds good
 
473
                        float toRad = 3.141592 / 180;
 
474
                        _in_left += _in_right * sinf( m_wideCoeff * .5 * toRad);
 
475
                        _in_right -= _in_left * sinf( m_wideCoeff * .5 * toRad);
 
476
                        
455
477
                }
456
478
 
457
479
        private:
458
 
                const float m_wideCoeff;
 
480
                // Lou's Hack
 
481
                int m_wideCoeff;
 
482
                //-----------
459
483
        } ;
460
484
 
461
485
} ;