[Webkit-unassigned] [Bug 49557] Add loadPlatformAudioResource() and decodeAudioFileData() to ChromiumBridge

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 23 09:04:24 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=49557





--- Comment #13 from Darin Fisher (:fishd, Google) <fishd at chromium.org>  2010-11-23 09:04:24 PST ---
(From update of attachment 73930)
View in context: https://bugs.webkit.org/attachment.cgi?id=73930&action=review

> WebKit/chromium/public/WebAudioBus.h:46
> +    ~WebAudioBus();

so any public method of a WebKit API class that is not inline needs to be decorated with WEBKIT_API.
otherwise, it will break the Chromium multi-DLL build if Chromium code tries to call one of these
methods.

now, stepping back... i don't think you actually intend for Chromium to call the destructor or the
initialize method.  this suggests that they should be hidden from Chromium, so that Chromium cannot
possibly call them.

since your goal is to pass data to Chromium in the scope of a decodeAudioFileData call, I suspect
that you would be better served defining WebAudioBus as an interface, like WebVideoFrame.  then,
in chromium/src/, just define a WebAudioBusImpl class that implements the interface and provides
methods for initialization and releasing the contained AudioBus object.

> WebKit/chromium/public/WebAudioBus.h:63
> +    WebAudioBus(const WebAudioBus& d) : m_private(0) { }

you also want to implement an assignment operator, and it is not necessary
to actually implement this copy constructor since you never intend for anyone
to call it.  you basically want the equivalent of DISALLOW_COPY_AND_ASSIGN
from base/basictypes.h in the Chromium code base.

> WebKit/chromium/public/WebKitClient.h:226
> +    virtual bool decodeAudioFileData(WebAudioBus* destinationBus, const char* audioFileData, size_t dataSize, double sampleRate) { return false; }

since audioFileData is intended to refer to an in-memory audio file, it would be more
consistent with API terminology to not call it a file.  instead, call it a resource.

then, i would suggest naming this method loadAudioResource, which matches up with
loadResource.  (i don't think it is helpful to include the name "decode" in the
function since there is no way to fetch the undecoded form.)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list