File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -615,6 +615,14 @@ ends_with_icase(const char* suffix) const {
615615// —————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
616616 // 📌📌📌 G E T 📌📌📌
617617 T* get () const { return static_cast <T*>(mem.get ()); }
618+ // —————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
619+ // 📌📌📌 S E T 📌📌📌
620+ void set (T* ptr, std::size_t size = 0 ) {
621+ if (mem.get () != ptr) {
622+ mem.reset (ptr);
623+ allocated_size = size;
624+ }
625+ }
618626// —————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
619627 // 📌📌📌 O P E R A T O R 📌📌📌
620628 T* operator ->() const { return get (); }
Original file line number Diff line number Diff line change @@ -1784,10 +1784,10 @@ int32_t mapping_inverse(vorbis_info_mapping_t *info) {
17841784 int32_t i, j;
17851785 int32_t n = s_blocksizes[s_dsp_state->W ];
17861786
1787- ps_ptr<int32_t *> pcmbundle; pcmbundle.alloc (sizeof (int32_t *) * s_vorbisChannels);
1788- ps_ptr<int32_t > zerobundle; zerobundle.alloc (sizeof (int32_t ) * s_vorbisChannels);
1789- ps_ptr<int32_t > nonzero; nonzero.alloc (sizeof (int32_t ) * s_vorbisChannels);
1790- ps_ptr<int32_t *>floormemo; floormemo.alloc (sizeof (int32_t *) * s_vorbisChannels);
1787+ ps_ptr<int32_t *> pcmbundle; pcmbundle.alloc (sizeof (int32_t *) * s_vorbisChannels); pcmbundle. clear ( );
1788+ ps_ptr<int32_t > zerobundle; zerobundle.alloc (sizeof (int32_t ) * s_vorbisChannels);
1789+ ps_ptr<int32_t > nonzero; nonzero.alloc (sizeof (int32_t ) * s_vorbisChannels);
1790+ ps_ptr<int32_t *> floormemo; floormemo.alloc (sizeof (int32_t *) * s_vorbisChannels); floormemo. clear ( );
17911791
17921792 /* recover the spectral envelope; store it in the PCM vector for now */
17931793 for (i = 0 ; i < s_vorbisChannels; i++) {
You can’t perform that action at this time.
0 commit comments