INTERACT FORUM

Windows => Plug-in Development => Topic started by: Oblong on January 29, 2004, 06:52:00 pm

Title: Input Plugin SetAttribute Problems
Post by: Oblong on January 29, 2004, 06:52:00 pm
I'm putting the finishing touches on my in_FLAC (FLAC input plugin) but I'm trying to overcome a nagging problem.

Although I return true from the SetAttribute method, and the tags are in fact written back to the file, MC always reports "Failed to update the following files..." with the path to the FLAC file.
The tags are successfully written, but does anyone have any insight on what (or how) MC considers a tag update a success or failure?

Walter...
Title: Re:Input Plugin SetAttribute Problems
Post by: Matt on January 29, 2004, 07:04:53 pm
Make sure you return TRUE in your CMJFileInfo::Close() on success and FALSE on failure.

Thanks Walter.
Title: Re:Input Plugin SetAttribute Problems
Post by: Oblong on January 29, 2004, 08:07:41 pm
Thanks for your quick response Matt.

I checked the Close method, and I am returning TRUE.

BOOL CMJFLACFileInfo::Close()
{
   #ifdef _DEBUG
      fprintf(log,"CMJFLACFileInfo::Close Begin\n");
      fflush(log);
   #endif


   m_Chain->write(true,false);

   if (m_vcomment != NULL) {delete m_vcomment;};

   #ifdef _DEBUG
      fprintf(log,"CMJFLACFileInfo::Close End\n");
      fflush(log);
   #endif

   return TRUE;
}

Any other thoughts?

Walter...
Title: Re:Input Plugin SetAttribute Problems
Post by: Matt on January 29, 2004, 09:14:38 pm
Make sure close and the destructor runs alright in the debugger. (no thrown exceptions)

Otherwise I'll have to look at the MC code tomorrow.  More later...
Title: Re:Input Plugin SetAttribute Problems
Post by: Oblong on January 29, 2004, 10:26:52 pm
That was it!
I was calling Close() again from my destructor, causing it to error.
I fixed that and it runs without error.

Thanks for your excellent advice.

BTW,
Is there a way to add FLAC to the MC Tools/Options/File Associations settings?

Walter...
Title: Re:Input Plugin SetAttribute Problems
Post by: Oblong on January 29, 2004, 10:29:07 pm
One other thing... ;D

Is there a way to add FLAC to the MC Tools/Import Media list?

Walter...