Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Commit 8b38c29

Browse files
piedoomdoomy
andauthored
Version 0.3.0 (#180)
* See changelog for change details Co-authored-by: doomy <2640792-_doomy@users.noreply.gitlab.com>
1 parent c3acb39 commit 8b38c29

File tree

13 files changed

+81
-54
lines changed

13 files changed

+81
-54
lines changed

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,30 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 0.3.0
9+
10+
### Fixed
11+
12+
- `SysExEvent` no longer contains invalid data on 64-bit systems ([#170](https://github.com/RustAudio/vst-rs/pull/171)]
13+
- Function pointers in `AEffect` marked as `extern` ([#141](https://github.com/RustAudio/vst-rs/pull/141))
14+
- Key character fixes ([#152](https://github.com/RustAudio/vst-rs/pull/152))
15+
- Doc and deploy actions fixes ([9eb1bef](https://github.com/RustAudio/vst-rs/commit/9eb1bef1826db1581b4162081de05c1090935afb))
16+
- Various doc fixes ([#177](https://github.com/RustAudio/vst-rs/pull/177))
17+
18+
### Added
19+
20+
- `begin_edit` and `end_edit` now in `Host` trait ([#151](https://github.com/RustAudio/vst-rs/pull/151))
21+
- Added a `prelude` for commonly used items when constructing a `Plugin` ([#161](https://github.com/RustAudio/vst-rs/pull/161))
22+
- Various useful implementations for `AtomicFloat` ([#150](https://github.com/RustAudio/vst-rs/pull/150))
23+
24+
### Changed
25+
26+
- **Major breaking change:** New `Plugin` `Send` requirement ([#140](https://github.com/RustAudio/vst-rs/pull/140))
27+
- No longer require `Plugin` to implement `Default` ([#154](https://github.com/RustAudio/vst-rs/pull/154))
28+
- `impl_clicke` replaced with `num_enum` ([#168](https://github.com/RustAudio/vst-rs/pull/168))
29+
- Reworked `SendEventBuffer` to make it useable in `Plugin::process_events` ([#160](https://github.com/RustAudio/vst-rs/pull/160))
30+
- Updated dependencies and removed development dependency on `time` ([#179](https://github.com/RustAudio/vst-rs/pull/179))
31+
832
## 0.2.1
933

1034
### Fixed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "vst"
3-
version = "0.2.1"
3+
version = "0.3.0"
4+
edition = "2021"
45
authors = [
56
"Marko Mijalkovic <marko.mijalkovic97@gmail.com>",
67
"Boscop",

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ include the crate directly from the official [Github repository](https://github.
2626

2727
```toml
2828
# get from crates.io.
29-
vst = "0.2.1"
29+
vst = "0.3"
3030
```
3131
```toml
3232
# get directly from Github. This might be unstable!
@@ -46,7 +46,7 @@ A simple plugin that bears no functionality. The provided `Cargo.toml` has a
4646
#[macro_use]
4747
extern crate vst;
4848

49-
use vst::plugin::{HostCallback, Info, Plugin};
49+
use vst::prelude::*;
5050

5151
struct BasicPlugin;
5252

@@ -92,7 +92,7 @@ crate-type = ["cdylib"]
9292

9393
#### Packaging on OS X
9494

95-
On OS X VST plugins are packaged inside of loadable bundles.
95+
On OS X VST plugins are packaged inside loadable bundles.
9696
To package your VST as a loadable bundle you may use the `osx_vst_bundler.sh` script this library provides. 
9797

9898
Example: 

src/api.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ use std::os::raw::c_void;
44
use std::sync::Arc;
55

66
use self::consts::*;
7-
use editor::Editor;
8-
use plugin::{Info, Plugin, PluginParameters};
7+
use crate::{
8+
editor::Editor,
9+
plugin::{Info, Plugin, PluginParameters},
10+
};
911

1012
/// Constant values
1113
#[allow(missing_docs)] // For obvious constants
@@ -473,10 +475,10 @@ impl Events {
473475
/// ```
474476
#[inline]
475477
#[allow(clippy::needless_lifetimes)]
476-
pub fn events<'a>(&'a self) -> impl Iterator<Item = ::event::Event<'a>> {
478+
pub fn events<'a>(&'a self) -> impl Iterator<Item = crate::event::Event<'a>> {
477479
self.events_raw()
478480
.iter()
479-
.map(|ptr| unsafe { ::event::Event::from_raw_event(*ptr) })
481+
.map(|ptr| unsafe { crate::event::Event::from_raw_event(*ptr) })
480482
}
481483
}
482484

src/buffer.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ impl<'a, 'b, T: Sized> IntoIterator for &'b mut Outputs<'a, T> {
293293
}
294294
}
295295

296-
use event::{Event, MidiEvent, SysExEvent};
296+
use crate::event::{Event, MidiEvent, SysExEvent};
297297

298298
/// This is used as a placeholder to pre-allocate space for a fixed number of
299299
/// midi events in the re-useable `SendEventBuffer`, because `SysExEvent` is
@@ -368,8 +368,7 @@ impl<'a> WriteIntoPlaceholder for Event<'a> {
368368
}
369369
}
370370

371-
use api;
372-
use host::Host;
371+
use crate::{api, host::Host};
373372
use std::mem;
374373

375374
/// This buffer is used for sending midi events through the VST interface.
@@ -482,7 +481,7 @@ impl SendEventBuffer {
482481

483482
#[cfg(test)]
484483
mod tests {
485-
use buffer::AudioBuffer;
484+
use crate::buffer::AudioBuffer;
486485

487486
/// Size of buffers used in tests.
488487
const SIZE: usize = 1024;

src/cache.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use std::sync::Arc;
22

3-
use editor::Editor;
4-
use plugin::{Info, PluginParameters};
3+
use crate::{editor::Editor, prelude::*};
54

65
pub(crate) struct PluginCache {
76
pub info: Info,

src/channels.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//! Meta data for dealing with input / output channels. Not all hosts use this so it is not
22
//! necessary for plugin functionality.
33
4-
use api;
5-
use api::consts::{MAX_LABEL, MAX_SHORT_LABEL};
4+
use crate::api;
5+
use crate::api::consts::{MAX_LABEL, MAX_SHORT_LABEL};
66

77
/// Information about an input / output channel. This isn't necessary for a channel to function but
88
/// informs the host how the channel is meant to be used.

src/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
use std::{mem, slice};
55

6-
use api;
6+
use crate::api;
77

88
/// A VST event.
99
#[derive(Copy, Clone)]

src/host.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ use std::path::Path;
1414
use std::sync::{Arc, Mutex};
1515
use std::{fmt, ptr, slice};
1616

17-
use api::consts::*;
18-
use api::{self, AEffect, PluginFlags, PluginMain, Supported, TimeInfo};
19-
use buffer::AudioBuffer;
20-
use channels::ChannelInfo;
21-
use editor::{Editor, Rect};
22-
use interfaces;
23-
use plugin::{self, Category, HostCallback, Info, Plugin, PluginParameters};
17+
use crate::{
18+
api::{self, consts::*, AEffect, PluginFlags, PluginMain, Supported, TimeInfo},
19+
buffer::AudioBuffer,
20+
channels::ChannelInfo,
21+
editor::{Editor, Rect},
22+
interfaces,
23+
plugin::{self, Category, HostCallback, Info, Plugin, PluginParameters},
24+
};
2425

2526
#[repr(i32)]
2627
#[derive(Clone, Copy, Debug, TryFromPrimitive, IntoPrimitive)]
@@ -932,7 +933,7 @@ extern "C" fn callback_wrapper<T: Host>(
932933

933934
#[cfg(test)]
934935
mod tests {
935-
use host::HostBuffer;
936+
use crate::host::HostBuffer;
936937

937938
#[test]
938939
fn host_buffer() {

src/interfaces.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
#![doc(hidden)]
44

55
use std::cell::Cell;
6-
use std::convert::TryFrom;
76
use std::os::raw::{c_char, c_void};
87
use std::{mem, slice};
98

10-
use api::consts::*;
11-
use api::{self, AEffect, TimeInfo};
12-
use buffer::AudioBuffer;
13-
use editor::{Key, KeyCode, KnobMode, Rect};
14-
use host::Host;
9+
use crate::{
10+
api::{self, consts::*, AEffect, TimeInfo},
11+
buffer::AudioBuffer,
12+
editor::{Key, KeyCode, KnobMode, Rect},
13+
host::Host,
14+
};
1515

1616
/// Deprecated process function.
1717
pub extern "C" fn process_deprecated(
@@ -88,7 +88,7 @@ pub extern "C" fn dispatch(
8888
ptr: *mut c_void,
8989
opt: f32,
9090
) -> isize {
91-
use plugin::{CanDo, OpCode};
91+
use crate::plugin::{CanDo, OpCode};
9292

9393
// Convert passed in opcode to enum
9494
let opcode = OpCode::try_from(opcode);
@@ -307,7 +307,7 @@ pub fn host_dispatch(
307307
ptr: *mut c_void,
308308
opt: f32,
309309
) -> isize {
310-
use host::OpCode;
310+
use crate::host::OpCode;
311311

312312
let opcode = OpCode::try_from(opcode);
313313
match opcode {

0 commit comments

Comments
 (0)