Inheritance diagram for PageMagickAudioTransition:


Public Member Functions | |
| PageMagickAudioTransition () | |
| virtual | ~PageMagickAudioTransition () |
| void | Initialise (PageMagickInfo *info) |
| void | GetFrame (int16_t **audio, int i, int &samples, int locked_samples) |
Private Attributes | |
| PageMagickInfo * | info |
| int16_t * | audio_buffers [4] |
| GDKAudioTransition * | transition |
| AudioResample< int16_ne_t, int16_ne_t > * | resampler |
Definition at line 1151 of file page_magick.cc.
|
|
Definition at line 1165 of file page_magick.cc. References audio_buffers, and DV_AUDIO_MAX_SAMPLES. 01165 : resampler( 0 ) 01166 { 01167 for ( int index = 0; index < 4; index ++ ) 01168 audio_buffers[ index ] = new int16_t[ 2 * DV_AUDIO_MAX_SAMPLES ]; 01169 }
|
|
|
Definition at line 1171 of file page_magick.cc. References audio_buffers, and resampler. 01172 {
01173 for ( int index = 0; index < 4; index ++ )
01174 delete[] audio_buffers[ index ];
01175 delete resampler;
01176 }
|
|
||||||||||||||||||||
|
Reimplemented from PageMagickAudio. Definition at line 1189 of file page_magick.cc. References audio_buffers, AUDIO_RESAMPLE_SRC_SINC_BEST_QUALITY, PageMagickInfo::channels, AudioInfo::channels, common, AudioResampleFactory< input_t, output_t >::createAudioResample(), PageMagickInfo::frequency, Frame::GetAudioInfo(), AudioTransition::GetFrame(), GetFramePool(), KinoCommon::getPlayList(), PageMagickInfo::GetPostFrame(), info, AudioTransition::IsBFrameConsumer(), AudioResample< input_t, output_t >::output, AudioResample< input_t, output_t >::Resample(), resampler, AudioResample< input_t, output_t >::size, and transition. 01190 {
01191 // Sanity checks ...
01192 if ( !transition )
01193 throw _( "Invalid audio filter selected" );
01194
01195 if ( transition->IsBFrameConsumer() )
01196 {
01197 // Pick up the b-frame audio (ugly.. moved by image transition when appropriate)
01198 // should also be resampled to the a-frames frequency - this is going to go haywire in
01199 // mixed sample rate projects :-/
01200 // In truth, even the aframes should be resampled to original aframes frequency... (fun, fun, fun)
01201 Frame* infoFrame = GetFramePool()->GetFrame();
01202 AudioInfo ainfo;
01203 common->getPlayList()->GetFrame( info->GetPostFrame() - 1, *( infoFrame ) );
01204 infoFrame->GetAudioInfo( ainfo );
01205 if ( ainfo.channels )
01206 {
01207 if ( !resampler )
01208 resampler = AudioResampleFactory<int16_ne_t,int16_ne_t>::createAudioResample(
01209 AUDIO_RESAMPLE_SRC_SINC_BEST_QUALITY, info->frequency, true );
01210 resampler->Resample( *infoFrame );
01211 int16_t *p = resampler->output;
01212 samples = resampler->size / info->channels / 2;
01213 for ( int s = 0; s < samples; s++ )
01214 for ( int c = 0; c < info->channels; c++ )
01215 audio_buffers[ c ][ s ] = *p++;
01216 }
01217 GetFramePool()->DoneWithFrame( infoFrame );
01218 }
01219 else
01220 {
01221 samples = locked_samples;
01222 }
01223 transition->GetFrame( audio, audio_buffers, info->frequency, info->channels,
01224 samples, time_info( *info, i ).position(), time_info( *info, i ).frame_delta() );
01225 }
|
|
|
Reimplemented from PageMagickAudio. Definition at line 1178 of file page_magick.cc. References common, PageMagickInfo::GetCommon(), KinoCommon::getPageMagick(), GDKAudioTransition::InterpretWidgets(), lookup_widget(), and transition. 01179 {
01180 this->info = info;
01181
01182 transition = info->GetCommon() ->getPageMagick() ->GetAudioTransition();
01183 if ( transition != NULL )
01184 transition->InterpretWidgets( GTK_BIN( lookup_widget( common->getPageMagick() ->window, "frame_magick_audio_transition" ) ) );
01185 else
01186 throw _( "Invalid audio transition selected" );
01187 }
|
|
|
Definition at line 1155 of file page_magick.cc. Referenced by GetFrame(), PageMagickAudioTransition(), and ~PageMagickAudioTransition(). |
|
|
Definition at line 1154 of file page_magick.cc. Referenced by GetFrame(). |
|
|
Definition at line 1157 of file page_magick.cc. Referenced by GetFrame(), and ~PageMagickAudioTransition(). |
|
|
Definition at line 1156 of file page_magick.cc. Referenced by GetFrame(), and Initialise(). |
1.4.2