Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$mol_audio refactor, added sample and scheduled nodes #654

Merged
merged 13 commits into from
Dec 30, 2023
Merged

Conversation

zerkalica
Copy link
Collaborator

No description provided.

audio/room/room.ts Outdated Show resolved Hide resolved
audio/room/room.ts Outdated Show resolved Hide resolved
audio/sample/sample.ts Outdated Show resolved Hide resolved
audio/sample/sample.ts Outdated Show resolved Hide resolved
audio/scheduled/scheduled.ts Outdated Show resolved Hide resolved
audio/scheduled/scheduled.ts Outdated Show resolved Hide resolved
audio/vibe/vibe.ts Outdated Show resolved Hide resolved
}
})

$.$mol_audio_context = $mol_audio_context_node
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$node['web-audio-api']

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Возможно даже так можно:

static context() {
    return $mol_dom_context.AudioContext || $node['web-audio-api']
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

да все-равно надо билдер опять фиксить, пока можно стаб оставить, я так и не смог найти

Copy link
Member

@nin-jin nin-jin Dec 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не надо тут ничего фиксить, нодовая зависимость должна динамически загружаться.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это ж универсальная реализация. Отдельный слайс для ноды не нужен.

}
})

$.$mol_audio_context = $mol_audio_context_node
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это ж универсальная реализация. Отдельный слайс для ноды не нужен.

audio/instrument/instrument.ts Outdated Show resolved Hide resolved
audio/room/room.ts Outdated Show resolved Hide resolved
static override create_context(): AudioContext & AudioContextNode {
const AudioContext = this.$.$node['web-audio-api'].AudioContext
return new AudioContext()
}
Copy link
Member

@nin-jin nin-jin Dec 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Context() {
    return ( this.$.$mol_dom_context || this.$.$node['web-audio-api'] ).AudioContext
}

nin-jin
nin-jin previously approved these changes Dec 29, 2023
@zerkalica zerkalica merged commit ae5310c into master Dec 30, 2023
20 checks passed
@zerkalica zerkalica deleted the audio-node branch December 30, 2023 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants