That's where I got the getBasePath function from. But there is at least one extended class, so I'm not sure which one I should be using, or how I would instantiate a modMediaSource object for a given media source.
What I am doing now is using a chunk with the path set in the given Media Source. Static resources can use a Media Source, since it uses the File Browser. But all it gets is the path in the File Browser. There's no way to indicate to the static resource on page load that it needs to get the static file from a Media Source base path.
So I have a plugin using OnLoadWebDocument to prefix the static resource's saved path with the base path.
case 'OnLoadWebDocument':
/* add the path to the resource content */
if($modx->resource->get('class_key') == 'modStaticResource') {
$path = $modx->getChunk('Path');
$modx->resource->set('content', $path . $modx->resource->get('content'));
}