

Public Member Functions | |
| AudioSwitch () | |
| virtual | ~AudioSwitch () |
| char * | GetDescription () const |
| void | GetFrame (int16_t **aframe, int16_t **bframe, int frequency, int channels, int &samples, double position, double frame_delta) |
| void | AttachWidgets (GtkBin *bin) |
| void | DetachWidgets (GtkBin *bin) |
Private Attributes | |
| GtkWidget * | window |
| gfloat | vectorA [MAX_VECTOR] |
| gfloat | vectorB [MAX_VECTOR] |
|
|
Definition at line 78 of file audio_transitions.cc. References magick_glade, and window. 00079 {
00080 window = glade_xml_get_widget( magick_glade, "window_switch" );
00081 }
|
|
|
Definition at line 83 of file audio_transitions.cc. References window. 00084 {
00085 gtk_widget_destroy( window );
00086 }
|
|
|
Reimplemented from GDKAudioTransition. Definition at line 113 of file audio_transitions.cc. References gtk_curve_reset_vector(), lookup_widget(), and window. 00114 {
00115 gtk_widget_reparent( ( GTK_BIN( window ) ) ->child, GTK_WIDGET( bin ) );
00116 GtkCurve *curveA = GTK_CURVE( lookup_widget( window, "curve1" ) );
00117 GtkCurve *curveB = GTK_CURVE( lookup_widget( window, "curve2" ) );
00118 gtk_curve_reset_vector( curveA );
00119 gtk_curve_set_curve_type( curveA, GTK_CURVE_TYPE_SPLINE );
00120 gtk_curve_set_curve_type( curveB, GTK_CURVE_TYPE_SPLINE );
00121 }
|
|
|
Reimplemented from GDKAudioTransition. Definition at line 123 of file audio_transitions.cc. References window. 00124 {
00125 gtk_widget_reparent( ( GTK_BIN( bin ) ) ->child, GTK_WIDGET( window ) );
00126 }
|
|
|
Implements AudioTransition. Definition at line 88 of file audio_transitions.cc. 00089 {
00090 return _( "Cross Fade" );
00091 }
|
|
||||||||||||||||||||||||||||||||
|
Implements AudioTransition. Definition at line 93 of file audio_transitions.cc. References lookup_widget(), MAX_VECTOR, vectorA, vectorB, and window. 00094 {
00095 GtkCurve * curveA = GTK_CURVE( lookup_widget( window, "curve1" ) );
00096 GtkCurve *curveB = GTK_CURVE( lookup_widget( window, "curve2" ) );
00097 gtk_curve_get_vector( curveA, MAX_VECTOR, vectorA );
00098 gtk_curve_get_vector( curveB, MAX_VECTOR, vectorB );
00099
00100 int pos = ( int ) ( position * MAX_VECTOR );
00101 double factorA = vectorA[ pos ];
00102 double factorB = vectorB[ pos ];
00103 if ( factorA + factorB > 1.0 )
00104 {
00105 factorA /= factorA + factorB;
00106 factorB /= factorA + factorB;
00107 }
00108 for ( int s = 0; s < samples; s ++ )
00109 for ( int c = 0; c < channels; c ++ )
00110 aframe[ c ][ s ] = ( int16_t ) ( ( double ) aframe[ c ][ s ] * factorA + ( double ) bframe[ c ][ s ] * factorB );
00111 }
|
|
|
Definition at line 73 of file audio_transitions.cc. Referenced by GetFrame(). |
|
|
Definition at line 74 of file audio_transitions.cc. Referenced by GetFrame(). |
|
|
Definition at line 72 of file audio_transitions.cc. Referenced by AttachWidgets(), AudioSwitch(), DetachWidgets(), GetFrame(), and ~AudioSwitch(). |
1.4.2