Thread Safe

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • thinktink
    Forum King
    • May 2009
    • 3351

    Thread Safe

    Inside in_mp3.dll are the exported functions winampGetExtendedFileInfo(W) multi-thread safe?
    | Opus Audio Codec plugins 2.0 | Embedded Album Art | DiskWrite |
    | Save your playlist first! | Live voice-over | X-Fade 2.5 |
    | AterKast (Source DSP) | More of my stuff... |
  • Benski
    Ben Allison
    Former Winamp Developer
    • Jan 2005
    • 1058

    #2
    No.

    Thread safety for metadata reading is provided by winamp.exe (via Critical Section)

    Comment

    • thinktink
      Forum King
      • May 2009
      • 3351

      #3
      Thank you VERY much for responding. I had my doubts as to why I was seeing certain errors.

      Damn-it damn-it damn-it damn-it damn-it damn-it damn-it damn-it damn-it damn-it damn-it damn-it damn-it damn-it damn-it damn-it damn-it damn-it damn-it damn-it damn-it damn-it damn-it damn-it damn-it, this entire time...

      Bah, I should know better anyways.



      Is there a way I can directly access/call/use that CRITICAL_SECTION object outside of ::SendMessageW(winampHWnd,...) mechanism? I need to be able to call these functions directly for speed reasons (and to minimize thread dead-locks) for a particular chain of functions that call it repeatedly.


      P.S.
      Nice to see you're still around. Pop in more often.
      | Opus Audio Codec plugins 2.0 | Embedded Album Art | DiskWrite |
      | Save your playlist first! | Live voice-over | X-Fade 2.5 |
      | AterKast (Source DSP) | More of my stuff... |

      Comment

      • Victhor
        Late skinner & Moderator
        • May 2003
        • 1629

        #4
        Originally Posted by thinktink View Post
        P.S.
        Nice to see you're still around. Pop in more often.
        I'd love to see that "former Winamp developer" loose the first word.. =D
        · · Big Bento Modern

        Comment

        • Benski
          Ben Allison
          Former Winamp Developer
          • Jan 2005
          • 1058

          #5
          Originally Posted by thinktink View Post
          Is there a way I can directly access/call/use that CRITICAL_SECTION object outside of ::SendMessageW(winampHWnd,...) mechanism? I need to be able to call these functions directly for speed reasons (and to minimize thread dead-locks) for a particular chain of functions that call it repeatedly.
          The critical section is required because many plugins implement a cache of the most recently queried file's metadata, and do so in an unsafe way.

          There is a Wasabi API called api_metadata. I think it's in the SDK somewhere. That essentially calls into the same function that the SendMessage(IPC_GET_EXTENDED_FILE_INFOW) API does, but without the SendMessage overhead. ml_local uses it for metadata reading, for example.

          There's also an old Winamp3 API (and available in winamp 5 for compatibility reasons) that can be used for thread-safe metadata reading without hitting the critical section, but only in_mp3 and in_wmvdrm implement it. I can dig up details on it if you need.

          For Winamp-for-Android (And the formerly in-progress Winamp 6 project), there is a much better metadata API, if only ...

          Comment

          • thinktink
            Forum King
            • May 2009
            • 3351

            #6
            Ah excellent, I think I've seen that API somewhere. Thanks.
            | Opus Audio Codec plugins 2.0 | Embedded Album Art | DiskWrite |
            | Save your playlist first! | Live voice-over | X-Fade 2.5 |
            | AterKast (Source DSP) | More of my stuff... |

            Comment

            Working...
            X