mirror of
https://github.com/emu-russia/pureikyubu.git
synced 2025-04-02 10:42:15 -04:00
27 lines
333 B
C++
27 lines
333 B
C++
// DSPcore stack implementation.
|
|
|
|
#pragma once
|
|
|
|
namespace DSP
|
|
{
|
|
|
|
class DspStack
|
|
{
|
|
uint16_t* stack;
|
|
int ptr = 0;
|
|
int depth;
|
|
|
|
public:
|
|
DspStack(size_t _depth);
|
|
~DspStack();
|
|
|
|
bool push(uint16_t val);
|
|
bool pop(uint16_t& val);
|
|
uint16_t top();
|
|
uint16_t at(int pos);
|
|
bool empty();
|
|
int size();
|
|
void clear();
|
|
};
|
|
|
|
}
|