synthizer
Advanced tools
+1
-1
| Metadata-Version: 1.0 | ||
| Name: synthizer | ||
| Version: 0.11.5 | ||
| Version: 0.11.6 | ||
| Summary: UNKNOWN | ||
@@ -5,0 +5,0 @@ Home-page: https://synthizer.github.io |
+1
-1
@@ -11,3 +11,3 @@ import os | ||
| VERSION = "0.11.5" | ||
| VERSION = "0.11.6" | ||
@@ -14,0 +14,0 @@ # A helper for rmtree. On Windows, read-only files can't be deleted by rmtree, so we make them not readonly. |
@@ -9,3 +9,3 @@ cmake_minimum_required(VERSION 3.15.0) | ||
| # Synthizer version. | ||
| add_compile_definitions(SYZ_MAJOR=0 SYZ_MINOR=11 SYZ_PATCH=2) | ||
| add_compile_definitions(SYZ_MAJOR=0 SYZ_MINOR=11 SYZ_PATCH=5) | ||
@@ -12,0 +12,0 @@ include(CTest) |
@@ -75,2 +75,3 @@ /** | ||
| def->userdata = (void *)f; | ||
| return 0; | ||
@@ -77,0 +78,0 @@ } |
@@ -59,2 +59,8 @@ #include <algorithm> | ||
| { | ||
| unsigned long long len; | ||
| CHECKED(syz_bufferGetSizeInBytes(&len, buffer)); | ||
| printf("Buffer size is: %llu\n", len); | ||
| } | ||
| CHECKED(syz_initRouteConfig(&route_config)); | ||
@@ -61,0 +67,0 @@ CHECKED(syz_createGlobalFdnReverb(&effect, context, NULL, NULL, NULL)); |
@@ -70,3 +70,3 @@ #pragma once | ||
| SYZ_CAPI syz_ErrorCode syz_initializeWithConfig(const struct syz_LibraryConfig *config); | ||
| SYZ_CAPI syz_ErrorCode syz_shutdown(); | ||
| SYZ_CAPI syz_ErrorCode syz_shutdown(void); | ||
@@ -125,3 +125,3 @@ SYZ_CAPI syz_ErrorCode syz_getLastErrorCode(void); | ||
| struct syz_AutomationPoint { | ||
| unsigned int interpolation_type; | ||
| int interpolation_type; | ||
| double values[6]; | ||
@@ -144,2 +144,8 @@ unsigned long long flags; | ||
| union syz_AutomationCommandParams { | ||
| struct syz_AutomationAppendPropertyCommand append_to_property; | ||
| struct syz_AutomationClearPropertyCommand clear_property; | ||
| struct syz_AutomationSendUserEventCommand send_user_event; | ||
| }; | ||
| struct syz_AutomationCommand { | ||
@@ -150,7 +156,3 @@ syz_Handle target; | ||
| unsigned int flags; | ||
| union { | ||
| struct syz_AutomationAppendPropertyCommand append_to_property; | ||
| struct syz_AutomationClearPropertyCommand clear_property; | ||
| struct syz_AutomationSendUserEventCommand send_user_event; | ||
| } params; | ||
| union syz_AutomationCommandParams params; | ||
| }; | ||
@@ -211,3 +213,4 @@ | ||
| syz_UserdataFreeCallback *userdata_free_callback); | ||
| SYZ_CAPI syz_ErrorCode syz_createStreamHandleFromCustomStream(syz_Handle *out, struct syz_CustomStreamDef *callbacks, | ||
| SYZ_CAPI syz_ErrorCode syz_createStreamHandleFromCustomStream(syz_Handle *out, | ||
| const struct syz_CustomStreamDef *callbacks, | ||
| void *userdata, | ||
@@ -243,2 +246,3 @@ syz_UserdataFreeCallback *userdata_free_callback); | ||
| SYZ_CAPI syz_ErrorCode syz_bufferGetLengthInSeconds(double *out, syz_Handle buffer); | ||
| SYZ_CAPI syz_ErrorCode syz_bufferGetSizeInBytes(unsigned long long *size, syz_Handle buffer); | ||
@@ -245,0 +249,0 @@ SYZ_CAPI syz_ErrorCode syz_createBufferGenerator(syz_Handle *out, syz_Handle context, void *config, void *userdata, |
@@ -168,4 +168,4 @@ #pragma once | ||
| std::shared_ptr<ByteStream> customStream(struct syz_CustomStreamDef *def); | ||
| std::shared_ptr<ByteStream> customStream(const struct syz_CustomStreamDef *def); | ||
| } // namespace synthizer |
@@ -163,3 +163,2 @@ #pragma once | ||
| if (!maybe_last) { | ||
| this->finished = true; | ||
| this->current_value = std::nullopt; | ||
@@ -166,0 +165,0 @@ return; |
@@ -219,1 +219,9 @@ #include "synthizer/buffer.hpp" | ||
| } | ||
| SYZ_CAPI syz_ErrorCode syz_bufferGetSizeInBytes(unsigned long long *size, syz_Handle buffer) { | ||
| SYZ_PROLOGUE | ||
| auto buf = fromC<Buffer>(buffer); | ||
| *size = buf->getLength() * buf->getChannels() * 2; | ||
| return 0; | ||
| SYZ_EPILOGUE | ||
| } |
@@ -85,17 +85,25 @@ #include "synthizer/byte_stream.hpp" | ||
| while (got < count) { | ||
| if (this->blocks.size() > this->current_block) { | ||
| if (this->current_block < this->blocks.size()) { | ||
| auto &cur = this->blocks[this->current_block]; | ||
| char *d = cur->data.data(); | ||
| unsigned long long needed = std::min<unsigned long long>(got - count, cur->count - this->current_block_pos); | ||
| char *d = cur->data.data() + this->current_block_pos; | ||
| unsigned long long needed = std::min<unsigned long long>(count - got, cur->count - this->current_block_pos); | ||
| std::copy(d, d + needed, destination); | ||
| destination += needed; | ||
| this->current_block_pos += needed; | ||
| if (this->current_block_pos == LOOKAHEAD_BLOCK_SIZE) | ||
| if (this->current_block_pos == cur->count) { | ||
| this->current_block_pos = 0; | ||
| this->current_block++; | ||
| } | ||
| got += needed; | ||
| } else { | ||
| /* No more blocks are recorded, so we need to do a read. */ | ||
| if (this->recording == false) { | ||
| // We're past the recorded data; just do normal reads. | ||
| got += this->stream->read(count - got, destination); | ||
| return got; | ||
| } | ||
| std::array<char, LOOKAHEAD_BLOCK_SIZE> data; | ||
| unsigned long long got_this_time; | ||
| got_this_time = this->read(LOOKAHEAD_BLOCK_SIZE, data.data()); | ||
| got_this_time = this->stream->read(LOOKAHEAD_BLOCK_SIZE, data.data()); | ||
| if (got_this_time == 0) | ||
@@ -115,3 +123,3 @@ break; // we reached the end. | ||
| void MemoryLookaheadStream::reset() { | ||
| assert(this->recording == false); | ||
| assert(this->recording == true); | ||
| this->current_block = 0; | ||
@@ -118,0 +126,0 @@ this->current_block_pos = 0; |
@@ -112,3 +112,3 @@ #include "synthizer.h" | ||
| SYZ_CAPI syz_ErrorCode syz_shutdown() { | ||
| SYZ_CAPI syz_ErrorCode syz_shutdown(void) { | ||
| SYZ_PROLOGUE_UNINIT | ||
@@ -115,0 +115,0 @@ |
@@ -169,5 +169,2 @@ #include "synthizer.h" | ||
| /** | ||
| * Do all the automation first, then run the sources. | ||
| * */ | ||
| { | ||
@@ -183,2 +180,3 @@ auto i = this->sources.begin(); | ||
| s->tickAutomation(); | ||
| s->run(); | ||
| i++; | ||
@@ -188,9 +186,2 @@ } | ||
| /** | ||
| * We just handled deleting all the soures; this time, we don't need to worry about that. | ||
| * */ | ||
| for (auto s : this->sources) { | ||
| s.second.lock()->run(); | ||
| } | ||
| this->source_panners->run(channels, destination); | ||
@@ -197,0 +188,0 @@ |
@@ -116,8 +116,11 @@ #include "synthizer/byte_stream.hpp" | ||
| drwav_uint32 flags = 0; | ||
| auto seek_callback = seek_cb; | ||
| /* Disable seeking if necessary. */ | ||
| if (stream->supportsSeek() == false) | ||
| if (stream->supportsSeek() == false) { | ||
| flags = DRWAV_SEQUENTIAL; | ||
| seek_callback = nullptr; | ||
| } | ||
| if (drwav_init_ex(&test_wav, read_cb, seek_cb, NULL, (void *)stream.get(), NULL, flags, NULL) == DRWAV_FALSE) | ||
| if (drwav_init_ex(&test_wav, read_cb, seek_callback, NULL, (void *)stream.get(), NULL, flags, NULL) == DRWAV_FALSE) | ||
| return nullptr; | ||
@@ -124,0 +127,0 @@ |
@@ -63,3 +63,4 @@ #include "synthizer.h" | ||
| SYZ_CAPI syz_ErrorCode syz_createStreamHandleFromCustomStream(syz_Handle *out, struct syz_CustomStreamDef *callbacks, | ||
| SYZ_CAPI syz_ErrorCode syz_createStreamHandleFromCustomStream(syz_Handle *out, | ||
| const struct syz_CustomStreamDef *callbacks, | ||
| void *userdata, | ||
@@ -66,0 +67,0 @@ syz_UserdataFreeCallback *userdata_free_callback) { |
@@ -102,3 +102,3 @@ #include "synthizer.h" | ||
| std::shared_ptr<ByteStream> customStream(struct syz_CustomStreamDef *def) { | ||
| std::shared_ptr<ByteStream> customStream(const struct syz_CustomStreamDef *def) { | ||
| if (def->read_cb == nullptr) { | ||
@@ -105,0 +105,0 @@ throw EValidation("Missing read callback"); |
| Metadata-Version: 1.0 | ||
| Name: synthizer | ||
| Version: 0.11.5 | ||
| Version: 0.11.6 | ||
| Summary: UNKNOWN | ||
@@ -5,0 +5,0 @@ Home-page: https://synthizer.github.io |
@@ -114,3 +114,3 @@ cdef extern from "synthizer.h": | ||
| cdef struct syz_AutomationPoint: | ||
| unsigned int interpolation_type | ||
| int interpolation_type | ||
| double values[6] | ||
@@ -129,3 +129,3 @@ unsigned long long flags | ||
| cdef union _syz_AutomationCommand_params_u: | ||
| cdef union syz_AutomationCommandParams: | ||
| syz_AutomationAppendPropertyCommand append_to_property | ||
@@ -140,3 +140,3 @@ syz_AutomationClearPropertyCommand clear_property | ||
| unsigned int flags | ||
| _syz_AutomationCommand_params_u params | ||
| syz_AutomationCommandParams params | ||
@@ -209,2 +209,4 @@ syz_ErrorCode syz_createAutomationBatch(syz_Handle* out, syz_Handle context, void* userdata, syz_UserdataFreeCallback* userdata_free_callback) | ||
| syz_ErrorCode syz_bufferGetSizeInBytes(unsigned long long* size, syz_Handle buffer) | ||
| syz_ErrorCode syz_createBufferGenerator(syz_Handle* out, syz_Handle context, void* config, void* userdata, syz_UserdataFreeCallback* userdata_free_callback) | ||
@@ -211,0 +213,0 @@ |
@@ -803,3 +803,3 @@ #cython: auto_pickle=False | ||
| return ret | ||
| cpdef get_length_in_samples(self): | ||
@@ -815,2 +815,7 @@ cdef unsigned int ret | ||
| cpdef get_size_in_bytes(self): | ||
| cdef unsigned long long ret | ||
| _checked(syz_bufferGetSizeInBytes(&ret, self.handle)) | ||
| return ret | ||
| cdef class BufferGenerator(Generator): | ||
@@ -817,0 +822,0 @@ def __init__(self, context): |
Sorry, the diff of this file is too big to display
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
22206177
0.04%